Skip to content

Make listfiles entry path relative to base directory#15

Merged
BillJr99 merged 3 commits into
mainfrom
claude/upbeat-pasteur-LsyDk
May 25, 2026
Merged

Make listfiles entry path relative to base directory#15
BillJr99 merged 3 commits into
mainfrom
claude/upbeat-pasteur-LsyDk

Conversation

@BillJr99
Copy link
Copy Markdown
Owner

The 'path' field on each entry was previously relative to the listed subdirectory, which caused callers (and LLMs) to fail when passing it back to mcpproxy__getfile — the parent prefix was missing for nested entries. Anchor 'path' to the base files directory so it is always directly usable with getfile, and call that out in the tool description.

claude added 3 commits May 25, 2026 18:07
The 'path' field on each entry was previously relative to the listed
subdirectory, which caused callers (and LLMs) to fail when passing it
back to mcpproxy__getfile — the parent prefix was missing for nested
entries. Anchor 'path' to the base files directory so it is always
directly usable with getfile, and call that out in the tool description.
The listing renderer and the follow-up getfile call both used 'name'
(basename), so files inside subdirectories were shown without their
parent prefix and the getfile lookup failed. Use 'path' (relative to
the base files directory) — which the listfiles tool now returns —
falling back to 'name' for compatibility.
Use a generic 'test-paths' subdirectory and verify both a base-level
file and a nested file round-trip through list_files -> get_file using
only the returned 'path' field, both when listing the subdir directly
and when listing the root recursively.
@BillJr99 BillJr99 merged commit 9bd7c43 into main May 25, 2026
2 checks passed
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.

2 participants