Read a code-quality guide entry

kb.getReadsOnly looks things up; never changes your workspace.

What it does

Reads one entry of the code-quality guide in full: a design pattern, a code smell or a refactoring, with what it is, when to use it, how it looks, an example, trade-offs and step-by-step mechanics. Use it after kb.search, architecture.advise or quality.smell_check gave you a ref or slug. Pass either ref (e.g. "smell:long-method") or both kind and slug (e.g. pattern + strategy); ref wins if both are given. Returns name, family, intent, triggers, signals (measurable hints), sources, sections, markdown (the full text) and related entries. An unknown entry returns an error; use kb.search to find the right slug. Read-only.

Ask your agent

You don’t call kb.get yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:

  • “Explain the strategy pattern with an example”
  • “How do I actually do an Extract Method refactoring?”

Inputs

NameTypeDescription
kind
optional
enumEntry kind, used together with slug: pattern, smell or refactoring.
Allowed: patternsmellrefactoring
slug
optional
stringEntry slug, used together with kind: lower-case with hyphens, e.g. "strategy", "long-method", "extract-method". Get it from kb.search.
ref
optional
stringKind and slug in one, "<kind>:<slug>", e.g. "pattern:strategy" or "smell:long-method" (the ref field of search results). Alternative to kind + slug.

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.get",
    "arguments": {
      "kind": "pattern"
    }
  }
}

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.