contacts: npm run mcp:demo crashes at create_contact (demo runs as the read-only calendar caller)

オープン
#45 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@TayHCode がすでに取り組んでいます。

2026年10月19日 から。

  • #46 @TayHCode による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, node.js
領域
testing, tooling

調査の方向性

Read src/api/protocol.js to confirm the caller permissions and scripts/mcp-demo.js around line 174, where the demo starts the server and handles create_contact. Run npm run mcp:demo in src/contacts to reproduce the error; done means the demo reaches “Session complete.” The issue says the author plans to open a PR, so check whether that work is already underway.

索引モデルが issue の本文から書いたものです。

説明

npm run mcp:demo in src/contacts crashes when it reaches create_contact.

The script starts the server as callerApp: 'calendar'. In src/api/protocol.js, ALLOWED_CALLERS gives calendar only READ_METHODS, so create_contact is not offered to it and the server answers -32602 Unknown tool "create_contact". The demo then throws a TypeError at scripts/mcp-demo.js:174, because it reads created.result.structuredContent from an error reply, and never reaches "Session complete." The search and suggest steps before it work.

The server seems to be behaving as designed (the calendar app is read-only on purpose). It is the demo that asks for a tool its caller was not given. The ai caller holds '*'.

Reproduce (main at 117ca24, Node v26.8.1):

git clone https://github.com/HeyPuter/everything && cd everything/src/contacts
npm install
npm run mcp:demo

Expected: the session plays through and ends with Session complete.

Actual (3 of 3 runs, exit 1):

  ← error -32602  Unknown tool "create_contact"
.../scripts/mcp-demo.js:174
const radiaId = created.result.structuredContent.contact.id
                               ^
TypeError: Cannot read properties of undefined (reading 'structuredContent')

Suggested fix: start the demo server as callerApp: 'ai' and update the banner line. That leaves the server and the calendar's read-only grant alone. With that change npm run mcp:demo exits 0 with Session complete. (3 of 3 runs) and npx vitest run passes (23 files, 313 tests). I'll open a PR that references this issue.

主要言語
JavaScript
スター
7.1k
フォーク
732
平均マージ
2時間 16分
マージ済み PR(30日)
13

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

HeyPuter/everything のほかの issue

HeyPuter/everything の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。