Clarify tool `parameters` JSON Schema validation behavior (depth, location, failure mode)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- nodejs
- Área
- api, documentation
Línea de trabajo
Comienza con nodejs/src/client.ts y sigue cómo se convierten los parámetros y se pasan a RPC; revisa el comentario de TaskCompleteData.success como pista documentada del fallo. Verifica el comportamiento de CLI o de la capa de modelo para la validación anidada y los fallos, y documenta la ubicación y profundidad de la validación, así como el resultado visible para el consumidor, en una página de documentación o una nota de lanzamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Where does tool parameters JSON Schema validation happen, and how deep does it go? This affects consumer architecture decisions for typed tools that aim to use the schema as the source of truth for input correctness.
Specific questions
-
Where does validation happen? The Node SDK (
nodejs/src/client.ts) passesparametersverbatim to RPC — no client-side validation, no JSON Schema validator imported. Validation, if any, must happen in the CLI binary or at the model layer. Where exactly? -
How deep does it go? For a schema like:
{ "type": "object", "required": ["topIssues", "summary"], "additionalProperties": false, "properties": { "topIssues": { "type": "array", "items": { "type": "object", "required": ["issueId", "severity"], "properties": {} } }, "summary": { "type": "string" } } }Does the runtime reject:
- Wrong top-level key? (
{top_issues: [...]}instead of{topIssues: [...]}) - Missing top-level required field? (
{topIssues: [...]}missingsummary) - Extra top-level key when
additionalProperties: false? - Wrong item-level shape? (
topIssues: [{title: "foo"}]— missing requiredissueIdandseverity) - Wrong nested type?
- Wrong top-level key? (
-
What happens on failure? Does the orchestrator get re-prompted with the validation error so it can self-correct? Or does the tool call just fail silently? The
TaskCompleteData.successfield has a comment "False when validation failed (e.g., invalid arguments)" suggesting validation surfaces somewhere, but the consumer-visible behavior isn't documented.
Why this matters
Consumers migrating from generic writeArtifact({path, content: "..."}) patterns to typed tools depend on what the boundary enforces. If item-level shape IS validated, the LLM physically cannot return a malformed inner structure. If it isn't, handler-side item-level checks remain necessary and the "typed tool" claim is partial.
For us specifically: we have ~6 LLM-driven agents currently writing terminal artifacts through a generic writeArtifact shape, with schema living only in the prompt. We see ~30-40% drift to wrong shapes (snake_case vs camelCase, renamed wrappers, etc.) which costs $15-30 per wasted phase. Migrating to typed phase tools is on the roadmap; the value of that migration depends on the answers above.
Evidence (SDK source — partial answer)
nodejs/src/client.ts: tool parameters are converted via toJsonSchema() (which calls parameters.toJSONSchema() for Zod schemas or passes JSON Schema objects through unchanged). No client-side validation. No JSON Schema validator (ajv, zod-validate, etc.) is imported.
Confirmed: the Node SDK does no validation. Validation, if any, is entirely in the CLI binary (which is not source-readable).
What we'd like
A docs page or release note clarifying: (a) where validation happens (SDK / CLI / model layer), (b) what shape it covers (top-level only / item-level / arbitrarily deep), (c) what happens on failure (re-prompt / silent / error).
If item-level isn't validated today, that promotes this from a question to a feature request: deep JSON Schema enforcement against parameters.
Environment
- SDK: @github/copilot-sdk@0.3.0
- CLI: @github/copilot@1.0.45
- Node: 22 LTS
- OS: Windows 11
- Model: claude-sonnet-4-6
- Lenguaje dominante
- Java
- Estrellas
- 10.5k
- Forks
- 1.5k
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 130
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/copilot-sdk
-
agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
github/copilot-sdk#2760 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
github/copilot-sdk#2759 ·
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
github/copilot-sdk#2709 · 1 comentario ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
github/copilot-sdk#2673 ·
Todos los issues de github/copilot-sdk
Issues similares
-
certification
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Abiertobug ecr
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Needs: Triage Type: Feature request
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
AntennaPod/AntennaPod#8794 ·
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100