Skip to content

fix(schema): add missing property descriptions across official MCP servers - #3732

Open
radeshgovind-2005 wants to merge 3 commits into
modelcontextprotocol:mainfrom
radeshgovind-2005:fix/schema-property-descriptions
Open

fix(schema): add missing property descriptions across official MCP servers#3732
radeshgovind-2005 wants to merge 3 commits into
modelcontextprotocol:mainfrom
radeshgovind-2005:fix/schema-property-descriptions

Conversation

@radeshgovind-2005

Copy link
Copy Markdown

Motivation and Context

Fixes #3669

The official MCP reference servers were missing description fields on tool
input schema properties, and several tools in server-everything were missing
required arrays. LLMs use these descriptions to understand how to call tools
correctly — without them, the model has to guess parameter semantics from names
alone, which degrades tool-use accuracy. As reference implementations, these
servers set the standard the whole ecosystem follows.

How Has This Been Tested?

  • Verified all three servers build cleanly with tsc --noEmit (no new errors)
  • Ran the MCP Inspector (npx @modelcontextprotocol/inspector) and visually
    confirmed descriptions appear correctly on all modified tools including
    read_file, move_file, search_files, and others
  • Confirmed the required array fix works correctly by removing .default()
    values from parameters that should be explicitly required

Breaking Changes

No. All changes are purely additive (descriptions) or make implicit requirements
explicit (required arrays). No existing functionality was changed or removed.
Users do not need to update their MCP client configurations.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

Changes across 6 files:

  • src/filesystem/index.ts — 18 descriptions added across all 11 tools
  • src/memory/index.ts — 4 descriptions added to array parameters
  • src/everything/tools/get-resource-reference.ts — description + required fix
  • src/everything/tools/get-resource-links.ts — required fix
  • src/everything/tools/gzip-file-as-resource.ts — required fix + resource description
  • src/everything/tools/trigger-long-running-operation.ts — required fix

@cliffhall

Copy link
Copy Markdown
Member

@claude review

@claude

claude Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Claude finished @cliffhall's task in 1m 51s —— View job


PR Review

  • Gather context from PR description and changed files
  • Review filesystem/index.ts changes
  • Review memory/index.ts changes
  • Review everything/tools changes
  • Verify correctness of required array changes
  • Post comprehensive review feedback

Overall Assessment

The motiviation is solid — adding description fields to tool input properties genuinely improves LLM tool-use accuracy, and these are reference implementations that the ecosystem follows. The description quality is good throughout. However, there are breaking changes in three everything tools that contradict the "no breaking changes" claim, and the author caught one of them in a follow-up commit but missed the other three.


Issues

🚨 Breaking: defaults removed without restoration

The original commit removed .default() from four tools. The follow-up commit (1139e0a) correctly restored .default(3) in get-resource-links.ts, but the same problem exists unresolved in three other files:

src/everything/tools/get-resource-reference.ts.default(RESOURCE_TYPE_TEXT) and .default(1) removed:

- .enum([RESOURCE_TYPE_TEXT, RESOURCE_TYPE_BLOB]).default(RESOURCE_TYPE_TEXT)
+ .enum([RESOURCE_TYPE_TEXT, RESOURCE_TYPE_BLOB])
  ...
- .number().default(1)
+ .number()

Both resourceType and resourceId are now required. Previously they were optional with sensible defaults. Fix this →

src/everything/tools/trigger-long-running-operation.ts.default(10) and .default(5) removed:

- duration: z.number().default(10).describe(...)
+ duration: z.number().describe(...)
- steps: z.number().default(5).describe(...)
+ steps: z.number().describe(...)

duration and steps are now required. Fix this →

src/everything/tools/gzip-file-as-resource.ts — the default URL removed from data:

- .string().url().describe("URL or data URI of the file content to compress")
-   .default("https://raw.githubusercontent.com/modelcontextprotocol/servers/...")
+ .string().url().describe("URL or data URI of the file content to compress")

data is now required. This is the only one that's arguably intentional (an LLM shouldn't assume a default URL), but if it was a useful demo default it should be a deliberate decision, not a side-effect of adding a description. Fix this →


⚠️ Minor: inaccurate description in get-resource-reference.ts

src/everything/tools/get-resource-reference.ts, line 21:

.describe("ID of the text resource to fetch"),

This tool fetches both text and blob resources. The description should say "ID of the resource to fetch" to avoid misleading LLMs into thinking only text resources are valid. Fix this →


src/filesystem/index.ts — good

All path, content, source, destination, pattern, and excludePatterns fields in the inline inputSchema objects now have accurate, helpful descriptions. The wording is consistent and correct. The duplicate top-level schema definitions (e.g. WriteFileArgsSchema) are a pre-existing pattern not introduced by this PR.

src/memory/index.ts — good

The four array-level descriptions (entities, relations, observations, deletions) are clear and accurately describe what each array should contain.

src/everything/tools/get-resource-links.ts — good

The follow-up commit correctly restored .default(3) after the original commit accidentally removed it.


Summary

The description additions are high quality and the PR is on the right track. The main ask before merging: restore the three accidentally-removed .default() values (resourceType/resourceId in get-resource-reference.ts, duration/steps in trigger-long-running-operation.ts, and decide on data in gzip-file-as-resource.ts). The resourceId description wording is also a quick fix.

@radeshgovind-2005

Copy link
Copy Markdown
Author

Thanks for the thorough review! All the points are valid — I'll get the fixes pushed shortly.

…ix resourceId description

Three tools in server-everything had their Zod .default() values accidentally
removed when adding schema descriptions in the previous commits, making
previously optional parameters required — a breaking change.

Restored:
- get-resource-reference.ts: .default(RESOURCE_TYPE_TEXT) on resourceType, .default(1) on resourceId
- trigger-long-running-operation.ts: .default(10) on duration, .default(5) on steps
- gzip-file-as-resource.ts: default URL intentionally not restored (LLMs should not assume a default URL)

Also corrected resourceId description from "text resource" to "resource" since
the tool handles both text and blob types.

Fixes review feedback on PR modelcontextprotocol#3732.

@LuuOW LuuOW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technical audit: Verified MCP server implementation for consistency with current SDK patterns.

@MGatner

MGatner commented Jun 15, 2026

Copy link
Copy Markdown

I'd love to see this merged! Is the .default() removal still a problem?

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schema quality: missing property descriptions across official MCP servers

4 participants