Skip to content

fix(mcp): agents see the parameter descriptions written for T3 tools - #23285

Open
only21mil wants to merge 12 commits into
pingdotgg:mainfrom
only21mil:r13/a048-keep-parameter-descriptions-in-orchestra
Open

only21mil wants to merge 12 commits into
pingdotgg:mainfrom
only21mil:r13/a048-keep-parameter-descriptions-in-orchestra

Conversation

@only21mil

@only21mil only21mil commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Existing descriptions on transformed string parameters were missing from the encoded JSON schema served to MCP clients.

Change

This moves those descriptions to the optional wrapper or Schema.annotateEncoded, preserving validation, defaults, and existing wording.

The change covers orchestrator, pull request, device, worktree, thread metadata, and scheduled task fields. Existing tests in core.test.ts check 22 representative field paths, and McpHttpServer.test.ts checks descriptions in authenticated tools/list responses for parent and delegated-child credentials. No UI changes.

Scope and approval

This is Maria's maintainer-directed takeover of a focused metadata bug fix. It restores descriptions already written for existing parameters without changing tool behavior or adding a feature.

Merged main at 32bf48f42820 with a merge commit. The conflict resolution preserves main's removal of thread metadata pull-request actions and keeps the description fix on surviving fields.

Verification

Verification at a6ea6a8e835246884514b8ff58d2edc3a79b8a8d:

  • Blacksmith vp run check:changed passed format, lint, both knip passes, graphql, 32 affected package typechecks, and 50 tests across six existing files.
  • Two independent gpt-6.1-sol reviews approved the same head without findings.
  • Individual provider sessions and model argument quality were not retested. MCP discovery is covered through the authenticated HTTP client path.

Takeover verification and conflict resolution by gpt-6.1-sol through the Codex harness in T3 Code. Original implementation by the contributor.

only21mil and others added 6 commits October 21, 2026 18:43
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agents read each tool's encoded-side JSON schema. A description set with
.annotate on a trimmed string lands on the decoded side and never reaches
them. Annotate the optional wrapper, as this code already does elsewhere,
or use Schema.annotateEncoded where the field is required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both fields add their description with `.annotate` after a
`Schema.makeFilter` check, which loses it from the encoded and the
decoded projection alike, so agents got bare strings and the walk in
tools.test.ts could not see the gap. Move both to
`Schema.annotateEncoded`, pin them by name, and say in the walk's
comment what it cannot catch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guard walk now follows every anyOf member and array items, which
exposes timeOfDay, signature.header and filters[].path on schedule_task
and update_scheduled_task. They move to Schema.annotateEncoded like the
other trimmed-string fields. Three more pins cover array items and union
members.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 22, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at aaad4ec

Macroscope's review found this PR approvable — This is a focused MCP schema metadata fix that makes existing parameter descriptions visible to agents without changing validation, tool execution, defaults, or production infrastructure. The added coverage checks all registered toolkits, including nested and union-based parameters.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between e88f93a and a6ea6a8.

Files selected for processing: 8
  • apps/server/src/mcp/McpHttpServer.test.ts
  • apps/server/src/mcp/toolkits/core.test.ts
  • apps/server/src/mcp/toolkits/pullRequests/tools.ts
  • packages/contracts/src/device.ts
  • packages/contracts/src/orchestratorMcp.ts
  • packages/contracts/src/scheduledTask.ts
  • packages/contracts/src/threadMetadataMcp.ts
  • packages/contracts/src/worktreeMcp.ts
Files skipped from review as they are similar to previous changes: 3
  • packages/contracts/src/scheduledTask.ts
  • packages/contracts/src/worktreeMcp.ts
  • packages/contracts/src/orchestratorMcp.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

Walkthrough

MCP contract and pull-request tool schemas now attach descriptions to optional or encoded schemas. Existing field types, optionality, validation constraints, and description text remain unchanged. Tests check descriptions in listed tool schemas.

Changes: MCP schema descriptions

Layer / File(s) Summary
Schema description annotations
packages/contracts/src/orchestratorMcp.ts, packages/contracts/src/scheduledTask.ts, packages/contracts/src/threadMetadataMcp.ts, packages/contracts/src/device.ts, packages/contracts/src/worktreeMcp.ts, apps/server/src/mcp/toolkits/pullRequests/tools.ts
Descriptions move to optional or encoded schemas. Field types, optionality, validation constraints, and description text remain unchanged.
Served schema description checks
apps/server/src/mcp/McpHttpServer.test.ts, apps/server/src/mcp/toolkits/core.test.ts
Tests check descriptions on selected pull-request tool parameters and across nested fields in selected listed tool schemas.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge, t3dotgg

Merge Risk: Minimal · up to a6ea6

No actionable merge-blocking issue is established for the MCP parameter-description change; it is mergeable after normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main fix: exposing existing parameter descriptions to agents using T3 MCP tools.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description includes all required sections. It clearly explains the problem, the implementation, scope, approval rationale, and focused verification results. The Scope and approval se…
Full details: Description check

Explanation

The pull request description includes all required sections. It clearly explains the problem, the implementation, scope, approval rationale, and focused verification results. The Scope and approval section does not provide a direct issue or approval-comment link, but it explains why this focused metadata fix does not require broader approval.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

only21mil and others added 2 commits October 22, 2026 01:12
…hestra

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hestra

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hestra

Resolve PullRequestTargetInput in pullRequests/tools.ts: keep this
branch's outer Schema.optional(...).annotate shape so the descriptions
reach the tool schema, and take main's host-neutral url and host
description text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

thanks @only21mil. the encoded-side diagnosis and annotation fix were right. i updated this branch directly and kept your commits.

merged current main and resolved the five conflicts using main's shorter wording. descriptions main intentionally removed stay removed. the fix now moves only existing guidance to the encoded schema or optional wrapper. replaced the new generic test file with 24 focused field cases in core.test.ts, and checked the real authenticated tools/list response in McpHttpServer.test.ts. compared the original diff against the final diff; no remaining guidance fix was dropped.

verification at a20bbc3baf87bca3ca0978cb75ad415128bf2ece:

  • reproduced the missing delegate_task.clientRequestId description on current main before the fix.
  • blacksmith vp run check:changed passed: format, lint, both knip passes, graphql, 30 affected package typechecks, and 50 tests in six existing files.
  • authenticated MCP discovery passes for parent and delegated-child credentials.
  • runtime comparison of 133 exported schemas found identical schemas after removing descriptions; 30 gain descriptions.
  • two independent gpt-6.1-sol reviews approved this head with no findings.

no ui changes. model argument quality and individual provider sessions were not retested. coderabbit skipped this head because its included review allowance was exhausted; no review bot was invoked manually.

all 27 ci checks are green on this head, and the pr is conflict-free and mergeable.

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

merged main at 32bf48f42820 without rebasing. resolved the thread metadata conflict by preserving main's removal of the old pull-request actions and keeping encoded descriptions on the surviving fields. removed the two assertions for deleted fields. the diff remains eight files, 153 additions and 86 deletions.

verification at a6ea6a8e835246884514b8ff58d2edc3a79b8a8d: blacksmith vp run check:changed passed format, lint, both knip passes, graphql, 32 package typechecks, and 50 tests in six existing files, including authenticated MCP discovery. two independent gpt-6.1-sol reviews approved this head without findings. no inline bot findings are open.

waiting for CI on the pushed head. no UI changed; individual provider sessions and model argument quality were not retested.

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Oct 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants