You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I used FileSystem MCP to connect my local file. But when I try to answer file content about the file, then the result will report
"It seems I'm unable to access the file sample.txt. Could you specify a path within the allowed directories, or provide the contents of the file here?"
And I could list all files by MCP server. So If i want to access the file content, how should I do .
Thanks
The text was updated successfully, but these errors were encountered:
Could you share some code? What model are you using?
Thanks for reply. I used MCP File system in Agent on my code. Then I used another way to solution this problem. The way is using absolute path to indicate which file I want to visit, that works in my code
Here is old code async with MCPServerStdio( name="File system MCP Service", params={ "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", /users/user/tmp ] }, ) as file_server: agent = Agent( name="Assistant", model="gpt-4o", instructions=''' I want to ask some question about sample.txt ''', mcp_servers=[file_server], )
it will failed first. then I changed the path to absolute path: /users/user/tmp/sample.txt in instructions, then it works
Hi,
I used FileSystem MCP to connect my local file. But when I try to answer file content about the file, then the result will report
"It seems I'm unable to access the file
sample.txt
. Could you specify a path within the allowed directories, or provide the contents of the file here?"And I could list all files by MCP server. So If i want to access the file content, how should I do .
Thanks
The text was updated successfully, but these errors were encountered: