Skip to main content
Glama

sp_search_document

Read-only

Search a pinned Russian normative document snapshot for literal phrases, tolerating whitespace differences, and return matching passages with surrounding context for accurate clause review.

Instructions

Literal whitespace-tolerant search in a pinned source snapshot with surrounding context.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "snapshot_id": "<snapshot_id>",
      "query": "<query>"
    },
    "name": "sp_search_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYes
offsetNo
snapshot_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, and destructiveHint=false, so the safety profile is covered. The description adds meaningful behavioral context: search is literal and whitespace-tolerant, operates on a pinned snapshot, and returns surrounding context. It does not explain pagination behavior (limit/offset) or how results are shaped, leaving some gaps.

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?

A single front-loaded sentence with no filler. Every phrase ('literal', 'whitespace-tolerant', 'pinned source snapshot', 'surrounding context') carries specific information.

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

Completeness2/5

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

For a four-parameter search tool with no output schema and no parameter descriptions, the definition is too thin. It omits how results are paged via limit/offset, what 'surrounding context' means quantitatively, and how the snapshot_id must be obtained, which an agent needs in order to call it correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for four undocumented parameters. Aside from loosely implying that 'query' is matched literally and whitespace-tolerantly, it says nothing about snapshot_id, limit, or offset semantics, nor about how required snapshot scoping works.

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

Purpose4/5

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

The description gives a specific verb ('search'), a specific resource ('pinned source snapshot'), and a qualifying behavior ('literal whitespace-tolerant... with surrounding context'). It is clear enough to distinguish from a generic document reader, though it does not explicitly contrast with the plural sibling 'sp_search_documents' or state that it searches within a single snapshot.

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

Usage Guidelines3/5

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

'Literal whitespace-tolerant search' implies the tool is for exact/phrase-like matching with flexible spacing, which hints at when to choose it over broader searches. However, there is no explicit when-to-use guidance, no exclusions, and no named alternative such as 'sp_search_documents'.

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