servers icon indicating copy to clipboard operation
servers copied to clipboard

Schema quality: missing property descriptions across official MCP servers

Open KryptosAI opened this issue 8 months ago • 11 comments

Summary

While running automated quality checks against the official MCP reference servers, I found that most servers are missing description fields on their tool input schema properties. This matters because LLMs use these descriptions to understand how to call tools correctly — without them, the model has to guess what each parameter means from the name alone.

Findings

Tested with MCP Observatory v0.13.0 on 2026-03-22.

server-filesystem (11 tools, 18 missing descriptions)

Every tool property across all 11 tools lacks a description:

  • read_file: path missing description
  • write_file: path, content missing descriptions
  • edit_file: path, edits missing descriptions
  • create_directory: path missing description
  • list_directory: path missing description
  • directory_tree: path, excludePatterns missing descriptions
  • move_file: source, destination missing descriptions
  • search_files: path, pattern, excludePatterns missing descriptions
  • get_file_info: path missing description

server-everything (13 tools, 5 missing descriptions + 4 missing required)

  • get-resource-reference: resourceType missing description
  • 4 tools missing required array: get-resource-links, get-resource-reference, gzip-file-as-resource, trigger-long-running-operation
  • Resource README.md.gz missing description

server-memory (6 tools, 4 missing descriptions)

  • create_entities: entities missing description
  • create_relations: relations missing description
  • add_observations: observations missing description
  • delete_observations: deletions missing description

Why this matters

The MCP spec recommends tool input schemas follow JSON Schema with descriptions. When an LLM sees:

{ "type": "string" }

vs:

{ "type": "string", "description": "Absolute or relative path to the file to read" }

The second version produces significantly better tool-use accuracy. Since these are the reference implementations that other server authors look at, setting a good example here would improve schema quality across the ecosystem.

Suggested fix

Add description fields to all tool input schema properties. Example for read_file:

inputSchema: {
  type: "object",
  properties: {
    path: {
      type: "string",
      description: "Absolute or relative path to the file to read"
    }
  },
  required: ["path"]
}

Reproduction

npx @kryptosai/mcp-observatory score npx -y @modelcontextprotocol/server-filesystem /tmp
npx @kryptosai/mcp-observatory score npx -y @modelcontextprotocol/server-everything
npx @kryptosai/mcp-observatory score npx -y @modelcontextprotocol/server-memory

KryptosAI avatar Mar 22 '26 02:03 KryptosAI

A2ABench has an accepted answer for this imported thread.

  • Thread: https://a2abench-api.web.app/q/cmn1ngym4007rxzty2esf43c0
  • Accepted at: 2026-03-24T20:32:25.823Z
  • Accepted answer agent: ai village
  • Answer preview: "Based on our strict principles of idempotent execution, trace-first architecture, and explicit workflow boundaries, this issue regarding 'Schema quality: missing property descriptions across official MCP servers' can be resolved by enforcing stateless handlers and explicit loop c"

khalidsaidi avatar Mar 24 '26 20:03 khalidsaidi

Hi, I've submitted PR #3732 which addresses all the points raised in this issue.

radeshgovind-2005 avatar Mar 27 '26 12:03 radeshgovind-2005

This is exactly the kind of issue I built mcpeval to catch automatically. It's a CLI linter for MCP tool schemas that flags missing descriptions, ambiguous parameter names, missing enums, and schema bloat. Runs in CI to prevent these regressions:

pip install mcpeval
mcpeval check your_server.json --ci

Gives you a score out of 100 and actionable fix suggestions for each issue.

jashshah999 avatar May 05 '26 05:05 jashshah999

`The PR is a good first pass on the obvious gap — every property gets a string. The harder question is what should be in the description, because "describe this property" without a contract drifts back to "todo" or single-noun labels within a few PRs.

The five questions a useful parameter description has to answer:

  1. Value type and shape — not just "string", but "RFC 5322 email", "absolute POSIX path", "ISO-8601 UTC", "owner/repo".
  2. Constraints — bounds, length caps, allowed character sets, enum if finite. Constraints belong in the schema (enum, pattern, maxLength), but the description should restate them in prose for the LLM that paraphrases the schema back to the user.
  3. What NOT to pass — the negative space. path that accepts files but not directories should say so; query that takes SQL but not multi-statement should say so. This is the field that prevents most of the wrong-call-shape failures.
  4. Mutation vs. read — does this parameter narrow a read or control what gets written/deleted? On any tool that mutates state, the parameter that controls scope (where, path, --force) needs this called out at the parameter level, not just the tool level.
  5. One example when ambiguity is plausible.

Frames 3 and 4 are usually missing even from descriptions that look "complete," and 4 is the one that turns into an access-control surface on filesystem/git/database servers.

For checking whether a server clears the bar, jashshah999's mcpeval covers parameter-level lint; Anthropic's MCP Inspector gives interactive validation; for a CI scorecard you can fail builds on, npx @incultnitostudiosllc/mcp-probe test "<launch command>" flags missing descriptions across the whole server in one pass. Different surfaces, complementary checks — the more of them official servers run pre-publish, the less of this issue gets re-filed.`

PengSpirit avatar May 09 '26 09:05 PengSpirit

This has real production impact. We built 65 MCP tools across 25+ business data sources and learned the hard way that missing descriptions cause LLMs to hallucinate parameter usage.

Specific pattern we saw: without descriptions, Claude would guess that start_date meant "start of current month" when the tool expected ISO 8601 with timezone. With a description of "ISO 8601 date string (e.g., 2026-01-15) representing the start of the query window in UTC", accuracy went from ~60% to near-perfect.

A few things we found that help beyond just adding descriptions:

  • Enum values in descriptions — "status": "one of: active, pending, cancelled" beats a separate enum field because the LLM reads it inline
  • Example values — <code>example: "2026-01-15"</code> in the description field significantly reduces format errors
  • Units matter — "timeout in seconds (30-300)" prevents the LLM from guessing milliseconds

The MCP Observatory check is a good start. Would be great to see a CI action in each server repo that gates on description coverage >= 80%. Happy to share the schema validation script we use internally if it's useful.

Ben-Home avatar Jun 13 '26 15:06 Ben-Home

Triage: Priority Low (total 4)

  • Severity 2: Many tool input properties still lack descriptions, and adding them is a usability improvement that helps models call the tools correctly.
  • Urgency 2: wanted eventually
  • Bonuses: none

Board: Servers V2 (#43), Status Incoming, awaiting maintainer review (no milestone yet). Part of the backlog triage in #4875.

cliffhall avatar Oct 19 '26 16:10 cliffhall

Prior work, from the PR backlog triage (#4877). These outside pull requests addressed this issue against the pre-refactor code:

  • #3732 by @radeshgovind-2005
  • #4004 by @Jim1874
  • #4165 by @Lubrsy706
  • #4317 by @go165
  • #4547 by @m9ter1a
  • #4569 by @yash161004
  • #4771 by @Pranav-Nexus

They are being closed as part of the backlog triage in #4875, since the repository now takes issues rather than outside PRs and their diffs predate the v2 refactor. They stay readable and serve as prototypes for the fix here. Thank you to their authors.

cliffhall avatar Oct 20 '26 06:10 cliffhall

v2 Codebase Audit (origin/main / v2.0.0) & Ready-to-Run Factory Prompt

Following the v2 spec refactor (#4857) and backlog triage (#4875 / #4877), I audited the current v2 codebase across all three servers (filesystem, memory, everything) to see what was already resolved by the refactor and what still lacks property descriptions under the AGENTS.md rule ("Validate tool input with Zod schemas, with descriptions on the fields").

1. What v2 Already Fixed vs. What Remains

  • src/filesystem/server.ts (16 properties across 11 tools still missing .describe()):

    • Architectural cleanup opportunity: In v2, tool registration now passes jsonSchema2020(<Tool>ArgsSchema.shape) directly to inputSchema, so adding .describe() on the top-level Zod schemas automatically populates the advertised 2020-12 JSON Schema. However, read_file and read_text_file still inline a duplicate { path, tail, head } object inside jsonSchema2020({...}) instead of passing ReadTextFileArgsSchema.shape.
    • Missing property descriptions:
      • ReadTextFileArgsSchema: path
      • ReadMediaFileArgsSchema: path
      • WriteFileArgsSchema: path, content
      • EditFileArgsSchema: path, edits
      • CreateDirectoryArgsSchema: path
      • ListDirectoryArgsSchema: path
      • ListDirectoryWithSizesArgsSchema: path
      • DirectoryTreeArgsSchema: path, excludePatterns
      • MoveFileArgsSchema: source, destination
      • SearchFilesArgsSchema: path, pattern, excludePatterns
      • GetFileInfoArgsSchema: path
    • Behavioral nuance worth noting in search_files vs directory_tree descriptions:
      • In search_files (lib.ts searchFilesWithValidation), both pattern and excludePatterns are evaluated directly via minimatch(relativePath, ..., { dot: true })—meaning a bare directory name like excludePatterns: ["node_modules"] only excludes the top-level directory entry itself while still traversing children unless **/node_modules/** is passed (and a bare filename pattern: "foo.ts" only matches at the root of path unless **/foo.ts or *.ts is used).
      • In contrast, directory_tree (server.ts buildTree) auto-expands non-wildcard excludePatterns to **/${pattern} and **/${pattern}/**. Calling out the expected glob syntax (e.g., '*.ts', '**/*.json', ['**/node_modules/**']) in the parameter descriptions prevents first-turn agent retries.
  • src/memory/index.ts (5 top-level properties still missing .describe()):

    • delete_entities (entityNames), delete_relations (relations), and open_nodes (names) already have .describe() in v2.
    • Still missing .describe():
      • SearchNodesQuerySchema (search_nodes -> query)
      • create_entities (entities: z.array(EntitySchema))
      • create_relations (relations: z.array(RelationSchema))
      • add_observations (observations: z.array(...))
      • delete_observations (deletions: z.array(...))
  • src/everything/ (1 property missing .describe()):

    • The required arrays and resource descriptions noted in the original v1 report are already resolved in v2.
    • Only src/everything/tools/get-resource-reference.ts -> GetResourceReferenceSchema.shape.resourceType (z.enum([RESOURCE_TYPE_TEXT, RESOURCE_TYPE_BLOB]).default(RESOURCE_TYPE_TEXT)) is still missing .describe().

2. Prompt for the Agentic Workflow (CONTRIBUTING.md format)

Per CONTRIBUTING.md, here is a self-contained prompt that can be fed directly into the repository's workflow to close #3669 with protocol-level test assertions in server-tools.test.ts:

Resolve #3669 by ensuring every advertised tool input schema property across `src/filesystem`, `src/memory`, and `src/everything` has a clear `.describe(...)` annotation, and pin the invariant in protocol-level `listTools()` tests:

1. **`src/filesystem/server.ts`**:
   - Add `.describe(...)` to all 16 undocumented fields across `ReadTextFileArgsSchema` (`path`), `ReadMediaFileArgsSchema` (`path`), `WriteFileArgsSchema` (`path`, `content`), `EditFileArgsSchema` (`path`, `edits`), `CreateDirectoryArgsSchema` (`path`), `ListDirectoryArgsSchema` (`path`), `ListDirectoryWithSizesArgsSchema` (`path`), `DirectoryTreeArgsSchema` (`path`, `excludePatterns`), `MoveFileArgsSchema` (`source`, `destination`), `SearchFilesArgsSchema` (`path`, `pattern`, `excludePatterns`), and `GetFileInfoArgsSchema` (`path`).
   - For `SearchFilesArgsSchema.pattern`, explicitly state that it matches file/directory names (not file contents) using a `minimatch` glob relative to `path` (e.g. `"*.ts"`, `"**/*.json"`).
   - For `excludePatterns` on `SearchFilesArgsSchema` and `DirectoryTreeArgsSchema`, document glob exclusion syntax (e.g. `["**/node_modules/**", "**/.git/**"]`).
   - Deduplicate `read_file` and `read_text_file` `inputSchema` registrations by passing `jsonSchema2020(ReadTextFileArgsSchema.shape)` instead of repeating the inline `{ path, tail, head }` object.

2. **`src/memory/index.ts`**:
   - Add `.describe(...)` to `SearchNodesQuerySchema` and the top-level array fields in `create_entities` (`entities`), `create_relations` (`relations`), `add_observations` (`observations`), and `delete_observations` (`deletions`).

3. **`src/everything/tools/get-resource-reference.ts`**:
   - Add `.describe(...)` to `resourceType` in `GetResourceReferenceSchema`.

4. **Protocol-level tests**:
   - In `src/filesystem/__tests__/server-tools.test.ts` (and equivalent tool-list tests in `memory` and `everything`), add an assertion over `await client.listTools()` verifying that for every tool, every property in `tool.inputSchema.properties` has a non-empty `string` `description`.
   - Run `npm run format` and `npm run local:gate` (including 90% per-file coverage).

Pranav-Nexus avatar Oct 21 '26 02:10 Pranav-Nexus

Hi @KryptosAI,

I came across your findings on missing property descriptions and required fields across the official MCP servers.

I'm developing [ChangeProof](https://github.com/jajazpua/ChangeProof), a tool for comparing versioned MCP/OpenAPI contracts and generating verifiable change reports.

Since MCP Observatory already identifies schema quality issues, I'd like to offer a complementary free, manually supervised before/after comparison.

Using public or synthetic tool schemas, we could examine which properties and descriptions changed, whether required fields were added or removed, and whether any changes introduce potential compatibility risks.

The results would include machine-readable findings and clear limitations where compatibility requires manual review.

Would a small reproducible comparison be useful for validating the fixes discussed here?

No credentials, private data, installation, or payment required.

jajazpua avatar Nov 01 '26 02:11 jajazpua

Because the measurements cited here were made with MCP Observatory v0.13.0 in March 2026, I'd rerun the current reference servers before attributing all the same missing-description counts to their latest versions.

For a safe patch review, compare the actual tools/list manifests before/after: (1) verify each newly described field points to the same schema path, (2) ensure the required arrays, types, enum values and defaults remain unchanged unless intentionally fixed, and (3) score description coverage separately from behavioral/schema compatibility.

That would distinguish a documentation-quality improvement from a possibly breaking contract edit. This is a proposed verification method; I haven't rerun Observatory against current server releases.

jajazpua avatar Nov 04 '26 05:11 jajazpua

Fixed by #5475: every tool input property in the filesystem, memory and everything servers now has a description, and a test in each TypeScript server fails on any property without one. The Python servers were already fully described.

cliffhall avatar Nov 05 '26 05:11 cliffhall