Skip to main content
Glama
avarant

Typesense MCP Server

index_multiple_documents

Index multiple documents in a Typesense collection by specifying an action (create, upsert, or update). Processes documents in a batch and returns results for each, including success or error details.

Instructions

Indexes (creates, upserts, or updates) multiple documents in a batch.

Args:
    ctx (Context): The MCP context.
    collection_name (str): The name of the collection.
    documents (list[dict]): A list of document dictionaries to index.
    action (str): The import action ('create', 'upsert', 'update'). Defaults to 'upsert'.

Returns:
    list[dict] | str: A list of result dictionaries (one per document) or an error message string.
                     Each result dict typically looks like {'success': true/false, 'error': '...', 'document': {...}}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoupsert
collection_nameYes
documentsYes
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the batch nature and available actions, but lacks details on permissions, rate limits, error handling, or what 'indexes' entails (e.g., storage implications). The return format is described, which adds value beyond basic function.

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 a purpose statement followed by Args and Returns sections. It's front-loaded and efficient, though the return description could be slightly more concise. Every sentence adds value without redundancy.

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

Completeness3/5

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

For a mutation tool with 3 parameters, 0% schema coverage, and no output schema, the description does adequately by covering parameters and return format. However, it lacks context on side effects, idempotency, or error cases, which would be helpful given the complexity.

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 0%, so the description must compensate. It explains all 3 parameters: collection_name, documents (as a list of dicts), and action (with enum-like values and default). This adds crucial meaning beyond the bare schema, though it doesn't detail document structure or collection requirements.

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 verb ('indexes') and resource ('multiple documents'), specifying it handles batch operations. It distinguishes from single-document siblings like create_document and upsert_document by emphasizing 'multiple' and 'batch', though it doesn't explicitly contrast with import_documents_from_csv.

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?

The description implies usage for batch indexing with different actions (create, upsert, update), but doesn't specify when to choose this over alternatives like create_document for single documents or import_documents_from_csv for CSV imports. No explicit when-not scenarios or prerequisites are mentioned.

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

Related 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/avarant/typesense-mcp-server'

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