Skip to main content
Glama

Start document query

metriport_start_document_query
Destructive

Starts a document query — retrieves the patient's medical documents from connected HIE networks. Returns a requestId; results arrive asynchronously. Medical API: POST /medical/v1/document/query (patientId and facilityId are required query params).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metadataNoOptional custom string key-value pairs returned in the webhook.
patientIdYesREQUIRED. The Patient ID to query documents for.
facilityIdYesREQUIRED. The Facility ID where the patient receives care.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior2/5

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

The description adds context about the asynchronous return and requestId, but it contradicts the annotations which mark destructiveHint: true. A retrieval action is not typically destructive, creating confusion. The description does not disclose any side effects or additional behavioral traits beyond what annotations provide.

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 concise (two sentences) and front-loaded with the core purpose. The inclusion of the API endpoint string is useful for developers but slightly redundant. No unnecessary words.

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?

Given the absence of an output schema, the description adequately explains that the tool returns a requestId and that results are asynchronous. It pairs well with sibling tools like get_document_query_status. However, it does not mention error handling or webhook details, which might be needed for full context.

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 100%, so the schema already documents all three parameters. The description reiterates that patientId and facilityId are required, but adds no new semantic meaning or usage nuances beyond the schema. The metadata parameter is mentioned in the schema but not elaborated in the description.

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 clearly states the action ('Starts a document query') and the resource ('retrieves the patient's medical documents from connected HIE networks'). It distinguishes from siblings by noting the asynchronous nature and return of a requestId, which contrasts with synchronous tools like list_documents or get_document_query_status.

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 indicates that results arrive asynchronously and a requestId is returned, implying that one should later check status using a sibling tool like get_document_query_status. However, it does not explicitly state when to use this tool versus alternatives such as start_consolidated_query or list_documents, nor does it provide exclusions or prerequisites.

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.