Skip to main content
Glama
opensearch-project

opensearch-mcp-server-py

Official

ExplainTool

Retrieve detailed reasons why a document matches or fails a query, enabling precise search relevance debugging.

Instructions

Returns information about why a specific document matches (or doesn't match) a query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
bodyYesRequest body containing the query to explain.
indexYes
aws_regionNoAWS region for IAM/Serverless authentication.
aws_iam_arnNoIAM role ARN for role-based authentication.
aws_profileNoAWS profile name for authentication.
opensearch_urlYesOpenSearch endpoint URL.
opensearch_no_authNoIf true, connect without authentication.
opensearch_timeoutNoConnection timeout in seconds.
opensearch_passwordNoPassword for basic authentication.
opensearch_usernameNoUsername for basic authentication.
opensearch_ssl_verifyNoSet true to require SSL certificate verification. A false value is ignored, since only the operator may disable verification.
aws_opensearch_serverlessNoIf true, use OpenSearch Serverless service.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.0
    • changedInput schema / properties / opensearch_ssl_verify / description
      Previous value: -"If false, disable SSL certificate verification."New value: +"Set true to require SSL certificate verification. A false value is ignored, since only the operator may disable verification."
  2. Changed1 schema field changedv0.11.0
    • changedInput schema / required
      Previous value: -[
      -  "body",
      -  "index",
      -  "id",
      -  "opensearch_url"
      -]New value: +[
      +  "id",
      +  "index",
      +  "body",
      +  "opensearch_url"
      +]
  3. First observedv0.9.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It is a single sentence that only restates the purpose and reveals nothing about return format, authentication requirements, read-only status, or side effects. For a tool with 13 parameters and zero annotation coverage, this is a significant transparency gap.

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 a single clean sentence with no filler or redundancy. However, it borders on under-specification rather than deliberate conciseness, since it is the entirety of the behavioral guidance for a complex 13-parameter tool. It earns a 4 for efficiency, not for completeness.

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?

With 13 parameters, no annotations, and no output schema, the description must do substantial work to be complete. It explains neither the return value format (which the absence of an output schema makes necessary) nor usage context nor operational behavior. The schema covers parameters well, but the overall definition leaves an agent under-informed about what to expect from the call.

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 description coverage is 85%, which is high (>80%), so the baseline of 3 applies. The schema already documents parameters like 'Request body containing the query to explain' and the authentication fields. The description adds no parameter-level detail beyond the schema, which is acceptable given the high coverage.

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 states a specific verb and resource: 'Returns information about why a specific document matches (or doesn't match) a query.' This clearly conveys the explain operation and inherently distinguishes it from siblings like SearchIndexTool (which returns matches) and CountTool (which counts matches). However, it doesn't explicitly name any sibling, so it stops short of 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 Guidelines3/5

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

Usage is implied: the agent can infer this tool is for diagnosing match rationale. But there is no explicit statement of when to use it versus alternatives like SearchIndexTool or MsearchTool, no exclusions, and no mention of prerequisites (e.g., requiring an existing index/document). Guidance is left to inference.

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