Skip to main content
Glama
Rixmerz
by Rixmerz

search_segment

Find relevant document segments using TF-IDF search, returning highlighted snippets with context around matched terms to locate specific information within large documents.

Instructions

Search for relevant segments using TF-IDF.

Returns snippets with matched terms highlighted.

Args: query: Search query (keywords or phrases). document_id: Optional: limit search to a specific document. segment_id: Optional: search within a specific segment only. limit: Maximum number of results to return (default: 5). context_words: Number of words around matches in snippets (default: 50).

Returns: Search results with scores and snippets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
document_idNo
segment_idNo
limitNo
context_wordsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool returns snippets with highlighted matches and includes default values for optional parameters, which adds useful behavioral context. However, it doesn't cover important aspects like performance characteristics, error handling, or authentication needs, leaving gaps for a search operation.

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?

The description is well-structured with clear sections for purpose, arguments, and returns. It's appropriately sized with no redundant information. Every sentence adds value, though the initial purpose statement could be slightly more front-loaded with key details.

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

Completeness4/5

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

Given the tool's moderate complexity (5 parameters, no annotations, but with output schema), the description is reasonably complete. It covers the purpose, all parameters with semantics, and mentions the return format. The presence of an output schema means it doesn't need to detail return values extensively, but it could better address usage context and behavioral traits.

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?

The schema description coverage is 0%, so the description must compensate. It effectively explains all 5 parameters: 'query' as search keywords/phrases, 'document_id' and 'segment_id' as optional scoping filters, 'limit' as maximum results, and 'context_words' as snippet size. This adds substantial meaning beyond the bare schema, though it could provide more detail on parameter interactions.

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 clearly states the tool searches for relevant segments using TF-IDF and returns snippets with highlighted matches. This specifies both the action (search) and resource (segments) with the TF-IDF method. However, it doesn't explicitly differentiate from sibling tools like 'get_adjacent_segments' or 'compare_segments', which is why it doesn't reach a 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_documents' for broader searches or 'get_adjacent_segments' for context-based retrieval. There's no indication of prerequisites or typical use cases, leaving the agent without contextual usage direction.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rixmerz/bigcontext_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server