Is your feature request related to a problem? Please describe.
when I configure probe mcp to cap its token output and nothing takes effect. The docs describe PROBE_MAX_TOKENS and --max-tokens/--max-results flags for limiting responses, but probe mcp silently ignores all of them:
- probe mcp accepts only --timeout, --lsp, --format — passing --max-tokens/--max-results starts the server with no error and no effect (they only exist on probe search).
- PROBE_MAX_TOKENS=1000 in the server env changes nothing; every response still reports <max_tokens>8000</max_tokens>.
- The search_code tool schema exposes only path, query, exact, strictElasticSyntax, session, nextPage, lsp — no per-call limit args
The server hardcodes a 20-result / 8000-token cap (verified it truncates a large result set at 8000 tokens) but gives no way to lower it. For MCP use, 8000 tokens per response is a lot of context window.
Describe the solution you'd like
A working, documented way to set limits on the MCP server, ideally any one of:
- Make probe mcp read PROBE_MAX_TOKENS (and a PROBE_MAX_RESULTS) from the server environment, and/or
- Expose max_tokens / max_results as optional per-call arguments on search_code and extract_code.
Additionally, probe mcp should fail loudly on unknown flags instead of silently ignoring them, since today they imply support that doesn't exist.
Describe alternatives you've considered
- Using the CLI flags documented for probe search on probe mcp — ignored.
- Setting PROBE_MAX_TOKENS env var — ignored on 0.6.0-rc330.
- Passing max_tokens/max_results as tool-call args — not part of the schema, ignored.
- Upgrading to the latest release (0.6.0-rc331) — no change, same behavior.
Additional context
- Environment: @probelabs/probe 0.6.0-rc330 via bun global, invoked as probe mcp --lsp.
- Every search_code response ends with a block (max_results, max_tokens) showing the hardcoded 8000/20 that can't be configured.
- Relevant docs claiming limits work: docs/probe-agent/protocols/mcp-integration.md, docs/probe-agent/protocols/mcp-server.md, docs/guides/security.md, docs/reference/faq.md.
Is your feature request related to a problem? Please describe.
when I configure probe mcp to cap its token output and nothing takes effect. The docs describe PROBE_MAX_TOKENS and --max-tokens/--max-results flags for limiting responses, but probe mcp silently ignores all of them:
The server hardcodes a 20-result / 8000-token cap (verified it truncates a large result set at 8000 tokens) but gives no way to lower it. For MCP use, 8000 tokens per response is a lot of context window.
Describe the solution you'd like
A working, documented way to set limits on the MCP server, ideally any one of:
Additionally, probe mcp should fail loudly on unknown flags instead of silently ignoring them, since today they imply support that doesn't exist.
Describe alternatives you've considered
Additional context