Skip to main content
Glama
the-momentum

FHIR MCP Server

by the-momentum

add_document_to_pinecone

Add a document to Pinecone vector storage with its FHIR DocumentReference ID, enabling semantic search over the indexed content.

Instructions

IMPORTANT: Always inform the user at the beginning of your response that this search operation may take some time because the embedding model will be loaded into cache. Adds a document to the Pinecone vector index for the specified FHIR DocumentReference ID.

This tool should be used to ingest new documents into the Pinecone index.

Rules: - If you cannot determine the format of the document fitting the format from the list, provide the format as None. - After adding the document, the Pinecone index may take up to 1 minute to update before the document is searchable.

Args: url (str): The URL of the document to be added. fhir_document_id (str): The ID of the FHIR DocumentReference resource corresponding to the document. format (literal | None): The format of the document.

Returns: str: Confirmation message that the document was added or already exists. PineconeError: Error object with a message if the operation fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the embedding model may load into cache, that the index may take up to 1 minute to update, and that the return value can indicate 'added or already exists'. This provides meaningful behavioral context beyond a simple mutating action.

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 structured with an important note, a purpose statement, rules, args, and returns. It is a bit longer than strictly necessary, but every section contributes useful information and the warning is front-loaded. Overall it is organized and readable.

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?

The description covers purpose, behavior, latency, return values, and parameter semantics, which is sufficient for a straightforward ingest tool. It does not explain the nested 'document' object structure, but the input schema fills that gap. Given the lack of annotations and low schema description coverage, the description does a solid job.

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%, but the description explains all three core fields (url, fhir_document_id, format) in plain terms. It also adds the rule to pass format as None when unknown, which is a semantic nuance not present in the schema. However, it does not mention that the schema wraps these fields in a 'document' object, which is a minor structural gap.

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 'Adds a document to the Pinecone vector index for the specified FHIR DocumentReference ID', which names the specific verb, resource, and scope. It also explicitly says 'This tool should be used to ingest new documents into the Pinecone index', distinguishing it from sibling tools like search_pinecone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description gives clear usage context ('should be used to ingest new documents') and includes important operational guidance, such as the need to inform the user about loading time and the up-to-1-minute index update delay. It does not explicitly exclude alternative tools, but the ingest-vs-search distinction is implicit from the sibling list.

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

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/the-momentum/fhir-mcp-server'

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