Skip to content

docs(testing): Add curl examples for MCP server scripting#11583

Open
tilladam wants to merge 2 commits intoslint-ui:masterfrom
tilladam:docs/mcp-readme-curl-examples
Open

docs(testing): Add curl examples for MCP server scripting#11583
tilladam wants to merge 2 commits intoslint-ui:masterfrom
tilladam:docs/mcp-readme-curl-examples

Conversation

@tilladam
Copy link
Copy Markdown
Contributor

Summary

  • Adds curl command examples to the "Usage with AI Agents" section of the MCP testing README, covering initialize, list_windows, and take_screenshot.
  • Motivated by observed agent behaviour: when given no concrete guidance, agents tend to reach for their built-in HTTP fetch tools (e.g. a WebFetch or similar MCP tool) rather than shelling out to curl. Those paths are less reliable for raw JSON-RPC and harder to reproduce manually. Steering agents toward curl explicitly gives them a working copy-paste template and keeps the examples directly usable from the command line too.

Test plan

  • Read through the rendered README and verify the code block is syntactically correct and the commands match the server's actual endpoints.
  • Run the gallery in MCP mode (SLINT_EMIT_DEBUG_INFO=1 SLINT_MCP_PORT=8080 cargo run -p gallery --features slint/mcp) and paste each curl command to confirm they work as shown.

Agents interacting with the embedded MCP server have been observed
reaching for their built-in fetch/HTTP tools rather than curl, which
tends to be less reliable for raw JSON-RPC. Steering them toward curl
explicitly reduces friction and makes the examples copy-pasteable
from the command line as well.
Same motivation as the README change: agents tend to reach for
built-in fetch tools when no example is given. Explicit curl snippets
steer them toward the more reliable path and keep the commands
directly usable from the terminal.
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.

1 participant