Search the code-quality guide
kb.searchReadsOnly looks things up; never changes your workspace.What it does
Searches the built-in code-quality guide (a knowledge base of design patterns, code smells and refactorings) by a symptom you notice or by a name, e.g. "same three parameters everywhere", "extract method" or "observer". Use it to put a name to a problem, then read the matching entry with kb.get. Matching is fixed keyword rules over each entry's name, intent and trigger phrases, so the same query always gives the same results. Returns results (ref such as "smell:long-method", kind, slug, name, family, intent, score, matched, uri) best first, and families (the group names per kind). Read-only.
Ask your agent
You don’t call kb.search yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:
- “What is it called when a function takes way too many arguments?”
- “Look up the observer pattern”
- “Find refactorings for deeply nested if statements”
Inputs
| Name | Type | Description |
|---|---|---|
queryrequired | string | A symptom or a name, in plain words, e.g. "switch on type in many places" or "strategy". |
kindsoptional | enum[] | Which kinds of entry to search, e.g. ["smell"] to name a problem first. Default: all three kinds. |
limitoptional | integer | Most results to return (1–20, default 8). |
The MCP call
What the agent’s MCP client sends (placeholders in angle brackets):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "kb.search",
"arguments": {
"query": "<query>"
}
}
}Connect your agent
npx -y @testmaze/mcp init tmt_xxx claude mcp add tm --scope project -- npx -y @testmaze/mcp
Create the token in your Test Maze workspace under Settings → MCP. Setup for Cursor, Cline, Gemini CLI and Codex CLI is shown there too.
More code quality tools
- Check code for smells
quality.smell_check - Suggest a design for a code structure problem
architecture.advise - Read a code-quality guide entry
kb.get