Skip to content

rename file param to path in get tool for LLM discoverability#373

Open
wolfkevin wants to merge 2 commits intotobi:mainfrom
wolfkevin:rename-get-file-param-to-path
Open

rename file param to path in get tool for LLM discoverability#373
wolfkevin wants to merge 2 commits intotobi:mainfrom
wolfkevin:rename-get-file-param-to-path

Conversation

@wolfkevin
Copy link

Fixes #372

What

Renames the file parameter to path in the get tool's inputSchema.

Why

path is the universal convention for parameters that accept file path strings - used by Claude's built-in Read tool (file_path), most MCP tools, and essentially every file-reading API. The name file reads as a file object, not a string path.

In practice, LLMs call get with { path: "..." } on the first try and get a validation error, requiring an extra round-trip to discover the correct name is file. This is exactly what happened during a real session using this MCP - the error surfaced the issue and led to this fix.

Changes

  • inputSchema: filepath
  • Handler destructuring: { file, ... }{ path, ... }
  • Error message: `Document not found: ${file}``Document not found: ${path}`
  • multi_get skip message: with file="..."with path="..."

Minor breaking change for clients explicitly passing { file: "..." } - worth calling out in CHANGELOG.

The `file` parameter name in the `get` tool caused LLMs to guess `path`
or `file_path` (the universal convention for file path parameters),
resulting in failed calls and unnecessary round-trips to discover the
correct name.

Fixes tobi#372
The `file` parameter name in the `get` tool caused LLMs to guess `path`
or `file_path` (the universal convention for file path parameters),
resulting in failed calls and unnecessary round-trips to discover the
correct name.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename file parameter to path in get tool for better LLM discoverability

1 participant