Skip to main content
Glama

datastore_query

Read-only

Query a Business Context datastore using semantic search (RAG - Retrieval Augmented Generation).

This tool searches for semantically similar content in the specified datastore. Results include content chunks that match the query based on meaning, not just keywords.

Optional metadata filters can be provided to narrow down results to specific files.

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": {
      "datastoreId": "<datastoreId>",
      "query": "<query>"
    },
    "name": "datastore_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 5, max: 20)
queryYesThe search query (semantic search)
datastoreIdYesThe datastore ID to search
metadataFiltersNoOptional JSON string of metadata filters. Format: [{"field": "fieldName", "operator": "equals", "value": "value"}]. Operators: equals, not_equals, contains, not_contains, gt, gte, lt, lte, in, is_null, is_not_null

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds real behavioral context beyond that: matching is by meaning rather than keywords and results are returned as content chunks, which tells the agent what kind of payload to expect. It stops short of describing ranking order, the default/max result count, or behavior when nothing matches.

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 core action is front-loaded in the first sentence, and the following sentences stay short and scannable. There is minor redundancy between 'semantically similar content' and 'based on meaning, not just keywords', and the '(RAG - Retrieval Augmented Generation)' expansion adds little for an agent.

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?

For a read-only search tool with a fully documented four-parameter schema, no output schema, and complete annotations, the description covers purpose, retrieval semantics, result shape, and filter intent. The remaining gap is operational detail such as result ordering and behavior on empty results, which is minor at this complexity.

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

Parameters3/5

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

Schema coverage is 100%, including the filter JSON format and operators, so the schema carries the parameter burden and baseline 3 applies. The description adds one useful piece of meaning beyond the schema: that metadataFilters restrict results to specific files, clarifying intent rather than just format.

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 and resource ('Query a Business Context datastore using semantic search') and explains the retrieval mode, which separates it from keyword/SQL siblings like table_sql or table_query. It does not explicitly name which datastore sibling (datastore_get_chunks, datastore_get_document, datastore_list) to prefer, so the differentiation is implied rather than stated.

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?

Usage is implied by describing semantic search and noting that optional metadata filters 'narrow down results to specific files', which hints at the retrieval-by-meaning use case. There is no explicit when-to-use/when-not guidance and no mention of alternatives such as fetching a full document via datastore_get_document instead of searching.

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.