Skip to main content
Glama
opensearch-project

opensearch-mcp-server-py

Official

CountTool

Returns the number of documents matching a query, enabling quick result counts for search and monitoring.

Instructions

Returns number of documents matching a query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoRequest body
indexNo
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. First observedv0.9.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, but it only states the return value. It does not disclose that this is read-only, how authentication is resolved across the many AWS/OpenSearch credential parameters, or what happens when no index or query is provided.

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?

A single sentence that is front-loaded with the operation and contains no fluff. It does not repeat schema details and earns its place by stating the tool's core behavior plainly.

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?

Although the schema richly documents parameters, the tool has 12 parameters, no annotations, and no output schema. The one-line description does not address how to form the query body, whether authentication is required, or what the count response looks like, leaving too much for the agent to infer.

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 high (92%), so the schema already documents the connection parameters and request body; the baseline of 3 applies. The phrase 'matching a query' adds slight meaning by implying the body should contain a query, but it does not explain query syntax or index/body 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 states a concrete operation ('Returns number') and a resource ('documents matching a query'), which distinguishes it from siblings like SearchIndexTool that return documents rather than counts. It does not explicitly name an alternative or endpoint, but the core purpose is unambiguous.

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 rather than explicit: the description suggests this tool is appropriate when a count of matching documents is needed. However, it does not provide when-not-to-use guidance or mention alternatives like SearchIndexTool or MsearchTool.

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