Skip to main content
Glama
junna-legal
by junna-legal

semantic_index

Index documents into a collection for semantic search. Automatically chunks and embeds text locally, with optional document_id to replace existing entries.

Instructions

Index a document into a collection for semantic search. Text is automatically chunked and embedded using a local ML model (no API calls). Use document_id to replace an existing document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentYesThe text content to index
metadataNoOptional metadata to associate with the document (e.g. source, title)
collectionYesName of the collection to index into
document_idNoOptional unique ID for the document. If provided and already exists, the document is replaced.
Behavior4/5

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

With no annotations, the description carries the transparency burden and does well by disclosing automatic chunking, local ML embedding, no API calls, and document_id-based replacement. It omits some edge-case behavior such as what happens if a collection doesn't exist or expected return values, but the core traits are clearly disclosed.

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?

Two concise sentences, with the primary action front-loaded and the replacement behavior placed second. No filler or repetition of the input schema.

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?

The input schema fully documents parameters and the description covers purpose, local processing, and replacement. However, with no output schema and no annotations, it leaves a few gaps like return value, synchronization behavior, and error conditions, preventing a perfect score.

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. The description adds meaningful parameter semantics by explaining that text is automatically chunked/embedded and by clarifying that providing document_id replaces an existing document, going beyond the schema's bare field descriptions.

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 opens with 'Index a document into a collection for semantic search', using a specific verb ('Index'), a clear direct object ('document'), and a destination ('collection'). This fully distinguishes the tool from siblings like semantic_search and semantic_clear.

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

Usage Guidelines4/5

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

It clearly states the use case (semantic search indexing) and adds context that text will be processed locally with no API calls, which helps an agent decide if this is appropriate. It does not explicitly exclude alternatives or name sibling tools, but the context is clear enough.

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/junna-legal/mcp-starter-kit'

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