rqb_diagnose returns an agent-facing next-action plan after a failed endpoint, and rqb_context returns surgical contract context unless you request compact or schema mode. Full request/response payloads only appear when you pass verbose: true.
Register with an agent
1
Install a project or agent config
--agent to install MCP config for every detected agent in the workspace.2
Restart or reload the agent
Each client discovers MCP servers differently. Restart the agent, reload MCP tools, or use the client’s MCP list command.
3
Verify registration
Config files written
Codex loads project-scoped
.codex/config.toml only for trusted projects. GitHub Copilot requires Agent mode and, for Business/Enterprise accounts, the organization’s MCP policy must allow MCP servers. Windsurf and Antigravity use global mcp_config.json files, so reload the client after installing.Available tools
For tools that execute a concrete spec or pipeline, the MCP server resolves variables from
api-docs/_shared/env.md, .env.local, RQB_* / MAD_* environment variables, session vars, and explicit tool vars. Explicit vars have the highest priority.
Not in MCP use these directly:
Compact vs verbose output
By default,rqb_exec and rqb_flow return only what agents need to act: pass/fail, status code, diff, and error type. Full request and response bodies are omitted.
verbose: true to include the full request and response objects.
Error taxonomy
All tools use a consistent set of error type strings so agents can branch without parsing text:
Execution errors include a
hint field with a short actionable string. For deeper branching after a failed endpoint, call rqb_diagnose and use its likely_cause, next_action, inspect, and verify fields.
Tool reference
rqb_exec
Execute one endpoint spec and return the HTTP result. Input
Compact output (default)
infer_expected: true
## Expected response block.
rqb_diagnose
Execute one endpoint and return a compact diagnosis for the agent’s next step. Use this afterrqb_exec fails and before reading backend source broadly.
Input
Output
structuredContent, so MCP clients can branch on error_type, likely_cause, inspect, and verify without parsing the text content.
rqb_flow
Run a pipeline and return per-step results. Input
Compact output (default)
rqb_author
Create a new spec file or update an existing one. Input
Output
{ "created": true, "file": "api-docs/...", "method": "POST", "path": "/users", "title": "Create User" }
On validation failure: the error from the parser. The file is not created or modified.
rqb_author validates the spec before touching the filesystem. If validation fails, nothing is written.rqb_vars
Show which variables a spec requires and which are resolved for the current environment. Input
Output
ready: true means all variables are resolved and the spec can be executed immediately.
rqb_search
Search specs without reading individual files. Useful for discovering relevant specs before deciding which ones to run. Input (all optional)
Output
rqb_context
Return bounded executable API context for an endpoint, flow, or changed specs. This is the lowest-token way to give an agent relevant request/response contracts without asking it to read many files. Input (all optional)
Output
structuredContent for MCP clients, so agents can consume method/path, bounded field lists, error responses, assertions, and verify commands without parsing text. Use mode: "schema" when the client wants the text content itself to be machine-readable JSON.
rqb_history
Return recent execution history for a spec. Input
Output
trend is "stable", "improving", or "regressing" based on the last 6 executions.
rqb_session
Get or set the session context. Session env and vars are used as defaults by all exec/flow tools explicit params always take priority. Input
Example set staging session
rqb_exec / rqb_flow calls use env: "staging" and authToken by default.
rqb_exec_batch
Execute multiple specs in one call and return a compact summary table. Input
Output
Assertion DSL
Specs can include structured assertions in a## Assertions section. Reqbook evaluates these after each execution and returns results in assertion_results.
exists, equals, contains, in, matches (regex).
Assertion results appear in rqb_exec output:
MCP resources
Specs are also accessible as MCP Resources under therqb://spec/ URI scheme. Agents can browse and read spec content directly through the protocol without calling any tool.