Skip to main content
Glama

search_context

Read-onlyIdempotent

Search the team knowledge base to find the most relevant sections on a topic, ranked and limited to a token budget. Use it to look up domain rules, conventions, or project notes.

Instructions

Search the team's knowledge base (domain rules, conventions, decisions, project notes) and return the most relevant sections, ranked, within a token budget. Use it to look something up or see what exists; use compile_bundle when you want one context block for a task. Read-only. Each section carries its path, heading, scope, score and last-updated date; results never exceed max_tokens and say how many sections the budget omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesWhat you are working on or looking for, as a natural-language sentence or a few keywords, in any language (e.g. 'retry policy for acquirer calls'). Required, non-empty.
top_kNoMaximum number of sections to return before the token budget applies (default 8, server-capped).
scopesNoKnowledge scopes to search, e.g. ["domain","conventions","projects/ledger-service"]. Default: domain and conventions. Use list_scopes to see the project scopes.
max_tokensNoToken budget for the returned sections (default 2000, must be positive). The result never exceeds it; lower-ranked sections are omitted first.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
budgetYes
chunksYes
scopesYes
omittedYes
total_tokensYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.5.0
    • changedInput schema / properties / max_tokens / description
      Previous value: -"Token budget for the returned sections (default 2000). The result never exceeds it."New value: +"Token budget for the returned sections (default 2000, must be positive). The result never exceeds it; lower-ranked sections are omitted first."
    • changedInput schema / properties / query / description
      Previous value: -"What you are working on or looking for, in natural language (e.g. 'retry policy for acquirer calls')"New value: +"What you are working on or looking for, as a natural-language sentence or a few keywords, in any language (e.g. 'retry policy for acquirer calls'). Required, non-empty."
    • changedInput schema / properties / scopes / description
      Previous value: -"Knowledge scopes to search, e.g. [\"domain\",\"conventions\",\"projects/ledger-service\"]. Default: domain and conventions."New value: +"Knowledge scopes to search, e.g. [\"domain\",\"conventions\",\"projects/ledger-service\"]. Default: domain and conventions. Use list_scopes to see the project scopes."
    • changedInput schema / properties / top_k / description
      Previous value: -"Maximum number of sections to return (default 8)"New value: +"Maximum number of sections to return before the token budget applies (default 8, server-capped)."
  2. First observedv0.4.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds meaningful behavioral detail beyond the annotations: results are ranked, never exceed max_tokens, report how many sections were omitted, and each section carries path, heading, scope, score, and last-updated date. Read-only and idempotent hints are consistent with the description and added context is genuinely useful.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with no filler: purpose, usage guidance, and return/limit behavior are each addressed in one efficient sentence. The most important information is front-loaded and every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is complete for a read-only search tool: it states what is searched, what is returned, budget constraints, read-only behavior, and when a sibling tool is the better choice. With 100% schema coverage, an output schema present, and annotations covering safety, nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage of all four parameters, including examples, defaults, and constraints, so the description does not need to explain them. The description reinforces the token-budget behavior already present in max_tokens but adds little beyond what the schema provides, matching the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('search') and resource ('team's knowledge base'), and clarifies it returns relevant sections ranked within a token budget. It explicitly differentiates itself from compile_bundle, making its role unmistakable even without inspecting the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It directly states when to use this tool ('look something up or see what exists') and names the alternative ('use compile_bundle when you want one context block for a task'). This is explicit when/when-not guidance with a clear sibling alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.