-
Notifications
You must be signed in to change notification settings - Fork 706
Create BATS tests for limactl-mcp #4060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
One thing I found while writing the test was that $ echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"run_shell_command","arguments":{"command":["cat","os-release"],"directory":"/etc"}}}' >&"${MCP[1]}"
$ read -t 1 -r line <&"${MCP[0]}"; jq . <<<"$line"
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "{\"stdout\":\"PRETTY_NAME=\\\"Ubuntu 25.04\\\"\\nNAME=\\\"Ubuntu\\\"\\nVERSION_ID=\\\"25.04\\\"\\nVERSION=\\\"25.04 (Plucky Puffin)\\\"\\nVERSION_CODENAME=plucky\\nID=ubuntu\\nID_LIKE=debian\\nHOME_URL=\\\"https://www.ubuntu.com/\\\"\\nSUPPORT_URL=\\\"https://help.ubuntu.com/\\\"\\nBUG_REPORT_URL=\\\"https://bugs.launchpad.net/ubuntu/\\\"\\nPRIVACY_POLICY_URL=\\\"https://www.ubuntu.com/legal/terms-and-policies/privacy-policy\\\"\\nUBUNTU_CODENAME=plucky\\nLOGO=ubuntu-logo\\n\",\"stderr\":\"\",\"exit_code\":0}"
}
]
}
} So you need to extract Is there a reason this can't be a normal nested object? |
f56729d
to
1f10d05
Compare
Beyond the encoded JSON thing, I don't understand the schema of the output: Why is And what does So I would expect the output of {
"jsonrpc": "2.0",
"id": 3,
"result": {
"stdout": "...",
"stderr": "",
"exit_code": 0
}
} |
576a149
to
5118e73
Compare
The If you make the |
MCP doesn't allow that schema: https://pkg.go.dev/github.com/modelcontextprotocol/[email protected]/mcp#CallToolResult
https://modelcontextprotocol.io/specification/2025-06-18/server/tools#structured-content also says "For backwards compatibility, a tool that returns structured content SHOULD also return the serialized JSON in a TextContent block." I guess we can revisit this later.
The current design is to follow Gemini's design |
19e7ded
to
3c04a67
Compare
I have more questions: The
What is the tool's root directory? How is the LLM to know what this means? If this command accepts relative patterns, why do the other tools insist on an absolute path? Why can't you pass a filename returned by The description for the
I think the negative explanation "this is not like something else" is not helpful. Also most LLMs will not even know what the Gemini Describe what the tool does, and what parameters it expects in a prescriptive manner. The It returns an error |
a6c02cb
to
0387659
Compare
Opened an issue about StructuredContent for tracking purpose: Please consider opening separate issues for other topics too.
The prompt was just copied from https://github.com/google-gemini/gemini-cli/blob/v0.5.5/docs/tools/file-system.md#4-glob-findfiles
The prompt was just copied from Gemini, but
Bug.
Maybe we should provide an additional MCP tool, if shelling out
Gemini may know?
Bug. |
I must have been confused about this; I can no longer reproduce the issue and get full path names now. I probably mixed it up with the results of |
f5e8cbb
to
0ebb19a
Compare
Needs rebase after merging: |
Signed-off-by: Jan Dubois <[email protected]>
I had an idea how to test
limactl-mcp
with BATS, so I wrote this PoC. I think it works well, but must obviously be fleshed out some more.This PR depends on #3744 and assumes it has been merged already.