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

Abierto
#45 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@TayHCode ya está trabajando en esto.

Desde el 19/10/2026.

  • #46 de @TayHCode — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, node.js
Área
testing, tooling

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
7.1k
Forks
732
Merge medio
2 h 54 min
PR fusionados (30 d)
21

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de HeyPuter/everything

Todos los issues de HeyPuter/everything

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.