# knowledge_search

Search the Gradus music-theory knowledge base for authoritative source material. The corpus includes hand-authored curriculum prose, Bach chorale analysis (408 chorales), score commentaries on 50+ orchestral works, and primary historical sources from Fux (1725) through Boulanger. WHEN TO USE: before generating notation if you need to look up a specific theory fact — typical voice leading for a Neapolitan-to-V resolution, idiomatic figured-bass realizations of a particular cadence, what makes a chromatic mediant feel like one composer's style versus another. Hitting this first prevents the agent from inventing chord progressions that are stylistically wrong. WHEN NOT TO USE: for generic music vocabulary ("what is a chord?") that any LLM already knows; for non-theory queries like composer biographies, performance recommendations, or history dates — those are out of scope; for fetching actual score notation (use notation_render or notation_examples instead). INPUT: provide EITHER topics (kebab-case tags) OR step (curriculum step 1-49). Topics are stronger; step is the fallback when you do not know the canonical topic tag. Both empty returns a MISSING_QUERY error. OUTPUT (JSON): { ok: true, requestId, chunks: [{ id, sourceType, sourceId, title, content, composer?, era?, topics: string[], curriculumSteps: number[], tokenEstimate }], meta: { query, returnedCount, totalTokens, responseTimeMs }, attribution }. sourceType is one of: kg_concept, score_analysis, score_commentary, bach_chorale_analysis, composer, dictionary, curriculum, lesson_content, practicum, voice_leading, fugue, chorale_exercise, etc. Empty chunks: [] when nothing matched the topics — agent should fall back to its own knowledge or try a different topic tag. EXAMPLE INPUT: { "topics": ["voice-leading", "deceptive-cadence"], "limit": 3 } TYPICAL LATENCY: 200-700 ms (one Voyage 3 embedding call + Supabase pgvector RPC).

Agent View of the PolicyLayer registry record for `knowledge_search`. HTML page: https://policylayer.com/tools/com-gradusmusic-notation/knowledge-search

## Facts

- Tool: `knowledge_search`
- Server: Gradus Notation (`@gradusmusic/notation-mcp`) — https://policylayer.com/tools/com-gradusmusic-notation.md
- Install: `npx -y @gradusmusic/notation-mcp`
- Homepage: https://github.com/delmas41/gradusnotation
- Risk category: Read (Low risk)
- Registry record: grade C, identity unverified
- Server rate-limited: no
- Parameters: 4
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `step` | integer | no | Curriculum step number (1-49). Fallback when you do not know the topic tag. Maps to the Gradus 10-stage curriculum: Stage I 1-7 (single voice, intervals, scales |
| `limit` | integer | no | Maximum chunks to return. Default 8 is right for most queries; raise for broad surveys, lower for tight context budgets. |
| `topics` | array | no | Topic tags in kebab-case. Matched semantically via Voyage 3 Large embeddings plus a topic-overlap boost; exact-match is not required, so close synonyms work. Ex |
| `maxTokens` | integer | no | Token budget for the combined chunk content. Default 1500 fits comfortably in most agent context windows. The endpoint greedy-selects highest-similarity chunks |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "knowledge_search",
    "arguments": {}
  }
}
```

## Why knowledge_search is rated Low

This tool queries a static knowledge base and returns informational results about music theory. It retrieves data without side effects, making it a Read operation. The low severity reflects the benign nature of accessing educational reference material with no capability to modify state, execute code, or cause harm.

From the tool's own definition: "Tool description states 'Search the Gradus music-theory knowledge base' and lists retrieval of 'hand-authored curriculum prose, Bach chorale analysis, score commentaries, and primary historical sources.' No modifications, deletions, code execution, or…"

## Use case

AI agents call knowledge_search to retrieve information from Gradus Notation without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Gradus Notation:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "knowledge_search": {}
  }
}
```

## Other tools on Gradus Notation (9)

- `notation_examples` — Read — https://policylayer.com/tools/com-gradusmusic-notation/notation-examples.md
- `notation_render` — Read — https://policylayer.com/tools/com-gradusmusic-notation/notation-render.md
- `notation_schema` — Read — https://policylayer.com/tools/com-gradusmusic-notation/notation-schema.md
- `notation_validate` — Read — https://policylayer.com/tools/com-gradusmusic-notation/notation-validate.md
- `theory_analyze_score` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-analyze-score.md
- `theory_parse_xml` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-parse-xml.md
- `theory_pitch_utils` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-pitch-utils.md
- `theory_respell` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-respell.md
- `theory_validate_ranges` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-validate-ranges.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=com-gradusmusic-notation · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-gradusmusic-notation
