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

Aperta
#45 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@TayHCode ci sta già lavorando.

Dal 19/10/2026.

  • #46 di @TayHCode — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js
Ambito
testing, tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
7.1k
Fork
732
Merge medio
2h 16m
PR unite (30g)
13

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di HeyPuter/everything

Tutte le issue di HeyPuter/everything

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.