Skip to main content
Glama

search_documents

Semantic search over indexed notes and files. Meters 1 rag_query. Returns hits plus budget and keyBudget. source=documents searches the whole index or one namespace and checks ACL rag_search (former rag_search). source=memory limits the search to prefs, facts, or run and checks ACL memory_search (former memory_search). That response also includes scope and namespace. Read only: no writes and no email. Use index_document to add text first. Use manage_memory action=get to read an exact key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topKNoMaximum hits. Default 5, maximum 20.
queryNoNatural-language query. Required for both sources.
scopeNoLimit source=memory to this scope. Omit to search without a scope filter. Ignored when source=documents.
sourceYesdocuments checks ACL rag_search and accepts namespace. memory checks ACL memory_search and accepts scope. Required. No default.
namespaceNoLimit source=documents to this namespace. Omit to search every namespace the key may access. Ignored when source=memory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden, and it does: it discloses metering cost ('Meters 1 rag_query'), ACL checks per source (rag_search vs memory_search), the return payload ('hits plus budget and keyBudget', plus scope and namespace for memory), and safety posture ('Read only: no writes and no email'). These are exactly the behavioral traits an agent needs before invoking it.

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

Conciseness4/5

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

Front-loaded with purpose and cost, then mode behavior, then alternatives in a logical order. It is dense but almost every clause earns its place; the parenthetical legacy names ('former rag_search'/'former memory_search') and a few repeated wordings add slight bulk without new decision value.

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?

For a 5-parameter, no-output-schema tool, the description covers the return shape, metering, ACL requirements, both source modes, and sibling alternatives, so an agent has enough to call it correctly without reading the schema. Nothing material for correct invocation appears to be missing.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description goes further by explaining the semantic role of source (which index and which ACL each value implies) rather than restating types. It adds marginal value on scope/namespace via the mode descriptions, though much of that ('ignored when') is already duplicated in the schema.

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?

States a specific verb and resource ('Semantic search over indexed notes and files') and immediately branches into its two modes, source=documents vs source=memory, so an agent can tell what it is and how it differs from siblings like manage_memory. It also surfaces the ACL each mode checks, which is a distinct, discriminable facet.

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?

Explicitly routes the agent: 'Use index_document to add text first' and 'Use manage_memory action=get to read an exact key', naming the alternatives and the conditions that select them. It also states which source enum value to pick and what each scopes over, leaving little to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.