[Client] `callTool()` cannot defer `input_required` or send a later retry (MRTR)

Abierto
#767 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@xixi-box ya está trabajando en esto.

Desde el 22/11/2026.

  • #769 de @xixi-box — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
php
Área
api

Línea de trabajo

Read src/Client/Protocol.php around lines 560-627 and MAX_ROUND_TRIPS at line 69 to see how rounds are resolved through the elicitation handlers, then InputRequestResolver.php:145,163 for the message-only exception thrown from the callback. Check the callTool() signature and the linked pull request #769 before starting, since work may already be under way. Done means an opt-out that returns the raw InputRequiredResult plus a retry path accepting inputResponses and requestState, covered by a test against a tool that returns InputRequiredResult.

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

Descripción

Package: mcp/sdk 0.9.0; still present in v0.10.0 and main (7155eae)

Repro: $client->callTool('x', [...]) against a tool that returns InputRequiredResult, from a client that wants
to park the request until a human answers hours later.

Actual: Client\Protocol::request() always resolves rounds through the elicitation handlers
(src/Client/Protocol.php:560-627, MAX_ROUND_TRIPS at line 69). requestState is never exposed, and callTool()
takes no inputResponses / requestState. Throwing from the callback gives a message-only RuntimeException
(InputRequestResolver.php:145,163).

Expected: an option to return the raw InputRequiredResult, and a way to send the retry with inputResponses
and requestState. Deferral is what multi-round-trip requests are designed for. I understand automatic resolution
is deliberate (#456); this asks for an opt-out next to it. The Tasks extension (#428) covers task-augmented
requests, not plain MRTR.

Found while building Leash for the Symfony AI & PHP MCP SDK hackathon.

Lenguaje dominante
PHP
Estrellas
1.7k
Forks
206
Merge medio
1 d 19 h
PR fusionados (30 d)
100

Preparar el entorno

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 modelcontextprotocol/php-sdk

Todos los issues de modelcontextprotocol/php-sdk

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.