FHIR MCP Server
Provides containerization support for easy deployment and scaling of the FHIR MCP Server.
Implements environment-based configuration management for server settings and sensitive credentials.
Integrates with Hugging Face models for document embeddings, supporting the semantic search functionality.
Utilizes PubMed-based embedding models for medical document processing and retrieval.
Includes a badge link to the Momentum website via Safari.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FHIR MCP Serverfind the latest lab results for patient John Smith"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Table of Contents
Related MCP server: FhirMCP
π About The Project
FHIR MCP Server implements a complete Model Context Protocol (MCP) server, designed to facilitate seamless interaction between LLM-based agents and a FHIR-compliant backend. It provides a standardized interface that enables full CRUD operations on FHIR resources through a comprehensive suite of tools - accessible from MCP-compatible clients such as Claude Desktop, allowing users to query and manipulate clinical data using natural-language prompts.
β¨ Key Features
π FastMCP Framework: Built on FastMCP for high-performance MCP server capabilities
π₯ FHIR Resource Management: Full CRUD operations for all major FHIR resources
π Intelligent Document Processing: AI-powered document ingestion and chunking for multiple formats including TXT, CSV, JSON, and PDF
π Semantic Search: Advanced document search using vector embeddings (via Pinecone)
π§ RAG-Ready: Retrieval-Augmented Generation pipeline with context-aware document queries
π Secure Authentication: OAuth2 token management for FHIR API integration
π LOINC Integration: Standardized medical terminology lookup and validation
π³ Container Ready: Docker support for easy deployment and scaling
π§ Configurable: Extensive
.env-based configuration options
ποΈ Architecture
The server is built with a modular architecture:
MCP Tools: Dedicated tools for selected FHIR resource types, with others handled by a generic tool
Fhir Server Client: Handles FHIR API communication and authentication (OAuth2 and more planned)
RAG Services: Embedding-based document processing and semantic retrieval
Vector Store: Pinecone integration for similarity-based search
LOINC Client: Integration with LOINC API for terminology resolution and validation
π‘ Demo
This demo shows how Claude uses the fhir-mcp-server to communicate with a FHIR server (in this case Medplum) to answer questions. You will see, among other things:
utilization of the
request_patient_resourcetool which retrieves basic patient informationutilization of the
request_condition_resourcetool to answer the question whether any of the previously diagnosed diseases may cause symptoms that the patient is currently complaining aboututilization of the
request_medication_resource,request_encounter_resource,request_generic_resourcetools to answer the question whether the patient has already received any treatment for hypertension
You can observe how Claude automatically selects the tools worth using to answer the question based on the user's query.
https://github.com/user-attachments/assets/3a3a8ed3-f881-447d-af03-5f24432a2cdd
Here you can observe how Claude first uses the tool searching for LOINC codes for the lipid panel specific codes, but not finding any related observations in FHIR server, it repeats the search for individual biomarkers that make up such a panel.
https://github.com/user-attachments/assets/2fb39801-d5d6-4461-bedd-9f58ab4d52ec
Developers working with FHIR often need to generate specific test data to validate FHIR server functionality, such as search capabilities and data relationships. While you can use Synthea to generate synthetic data and then manually import the resulting bundles to your server, fhir-mcp-server streamlines this process by allowing you to generate and deploy test data directly through Claude.
This eliminates the typical workflow of running synthea separately, downloading bundles, and manually importing them to your FHIR server. Instead, you can create targeted test scenarios, generate appropriate synthetic data, and populate your server all within Claude's interface.
https://github.com/user-attachments/assets/d87da1d8-6401-4a9e-a6f0-50ba23396e12
Note: fhir-mcp-server was not designed with this use case in mind, so as you'll see in the demo, it doesn't work perfectly - what can be observed, however, is how well the LLM handles using trial and error to correct any wrong choices.
π Getting Started
Follow these steps to set up FHIR MCP Server in your environment.
Prerequisites
Docker (recommended) or uv: For dependency management
FHIR Server Account: Access to FHIR API (e.g. Medplum)
Pinecone API key (required for document search): Enables vector-based search over processed documents. Without it, semantic retrieval features will be unavailable.
LOINC Account (optional): Enables retrieval of the latest LOINC codes from the official API. Without it, the system relies on static or language model-inferred codes, which may be outdated or imprecise.
Installation & Setup
Clone the repository:
git clone https://github.com/the-momentum/fhir-mcp-server cd fhir-mcp-serverSet up environment variables:
cp config/.env.example config/.envEdit the
config/.envfile with your credentials and configuration. See Environment VariablesInstall Dependencies
For Docker-based execution run:
make buildFor uv-based execution run:
make uvUpdate the MCP Client configuration
e.g. Claude Desktop -> edit
claude_desktop_config.json
Docker
{ "mcpServers": { "docker-mcp-server": { "command": "docker", "args": [ "run", "-i", "--rm", "--init", "--name", "fhir-mcp-server", "--mount", // optional - volume for reload "type=bind,source=<your-project-path>/app,target=/root_project/app", // optional - volume for reload "--mount", "type=bind,source=<your-project-path>/config/.env,target=/root_project/config/.env", "-e", "TRANSPORT_MODE=stdio", // Set transport mode: stdio, http, or https "mcp-server:latest" ] } } }Make sure to replace
<your-project-path>with the actual path to your installationuv
Firstly, get uv path from terminal:
Windows:
(Get-Command uv).PathMacOS/Linux:
which uv
Then, update config file:
{ "mcpServers": { "uv-mcp-server": { "command": "uv", "args": [ "run", "--frozen", "--directory", "<your-project-path>", "start" ], "env": { "PATH": "<uv-bin-folder-path>" } } } }Make sure to replace with the actual uv path (to bin folder)
Restart MCP Client
After completing all of the above steps, restart the MCP Client to apply the changes. In some cases, you may need to terminate all related processes using Task Manager or your system's process manager. This ensures that:
The updated configuration is properly loaded
Environment variables are correctly applied
The FHIR MCP client initializes with the correct settings
π§ Configuration
π Security & Encryption
The FHIR MCP Server includes built-in encryption infrastructure to protect sensitive configuration values. Sensitive fields like API keys and passwords are automatically encrypted and decrypted at runtime.
You are allowed to store passwords as a plain text, but if you want to have them encrypted, follow the instruction below.
Setting Up Encryption
For most users, use the automated setup script:
# uv method
uv run scripts/cryptography/setup_encryption.py
# docker method
docker exec fhir-mcp-server uv run scripts/cryptography/setup_encryption.pyThis script will:
Check for
MASTER_KEYinconfig/.envand generate one if neededAutomatically encrypt all sensitive values (
LOINC_PASSWORD,FHIR_SERVER_CLIENT_SECRET,PINECONE_API_KEY)Update your
.envfile with encrypted valuesSkip empty variables and already encrypted values
Generate a Master Key:
# uv method uv run scripts/cryptography/generate_master_key.py # docker method docker exec fhir-mcp-server uv run scripts/cryptography/generate_master_key.pyPut that key as a MASTER_KEY environment variable in .env.
Encrypt Sensitive Values:
# uv method uv run scripts/cryptography/encrypt_setting.py "your_secret_value" # docker method docker exec fhir-mcp-server uv run scripts/cryptography/encrypt_setting.py "your_secret_value"Decrypt Values (for verification):
# uv method uv run scripts/cryptography/decrypt_setting.py "encrypted_value" # docker method docker exec fhir-mcp-server uv run scripts/cryptography/decrypt_setting.py "encrypted_value"
Encrypted Configuration Fields
The following fields are automatically encrypted when using EncryptedField:
FHIR_SERVER_CLIENT_SECRET- OAuth2 client secret for FHIR serverLOINC_PASSWORD- LOINC account passwordPINECONE_API_KEY- Pinecone API key for vector search
Environment Variables
Variable | Description | Example Value | Encryption |
MASTER_KEY | Master encryption key |
| Required |
FHIR_SERVER_HOST | FHIR API host URL |
| No |
FHIR_BASE_URL | FHIR base path |
| No |
FHIR_SERVER_CLIENT_ID | OAuth2 client ID for FHIR |
| No |
FHIR_SERVER_CLIENT_SECRET | OAuth2 client secret for FHIR |
| Yes |
LOINC_ENDPOINT | LOINC API search endpoint |
| No |
LOINC_USERNAME | LOINC account username |
| No |
LOINC_PASSWORD | LOINC account password |
| Yes |
PINECONE_API_KEY | Pinecone API key |
| Yes |
EMBEDDING_MODEL | Hugging Face embedding model name |
| No |
π οΈ MCP Tools
The FHIR MCP Server provides a comprehensive set of tools for interacting with FHIR resources and document management:
FHIR Resource Tools
Tool | Resource Type | Description |
| Patient | Manage patient demographic and administrative information |
| Observation | Handle clinical measurements and assessments |
| Condition | Manage patient problems and diagnoses |
| Medication | Handle medication information and orders |
| Immunization | Manage vaccination records |
| Encounter | Handle patient visits and interactions |
| AllergyIntolerance | Manage patient allergy information |
| FamilyMemberHistory | Handle family health history |
| Any FHIR Resource | Operate on any FHIR resource not covered by specific tools |
Document Management Tools
Tool | Description |
| Manage FHIR DocumentReference resources |
| Ingests documents into the vector database for semantic search |
| Performs semantic search across indexed documents using vector embeddings |
LOINC Terminology Tools
Tool | Description |
| Retrieves standardized LOINC codes for medical observations and laboratory tests |
Tool Features
Full Resource Management: All FHIR resource tools support Create, Read, Update, and Delete operations
Data Validation: Tools enforce FHIR resource validation and prevent data corruption
Error Handling: Comprehensive error responses with detailed failure information
Security: OAuth2 authentication and proper access control for all operations
Semantic Search: AI-powered document search using vector embeddings
Multi-format Support: Document ingestion supports TXT, PDF, CSV, and JSON formats
πΊοΈ Roadmap
We're continuously enhancing FHIR MCP Server with new capabilities. Here's what's on the horizon:
Extended Authentication Options: In addition to OAuth2 (already supported), we plan to add support for other authentication methods for connecting to FHIR servers
Expanded File Format Support for RAG: Extend document ingestion capabilities to support additional formats
Table-Aware Document Chunking: Improve the document chunking pipeline by detecting tables in documents and treating them as separate, atomic chunks.
OCR Support for Scanned Documents: Implement Optical Character Recognition capabilities to enable extraction of text from scanned PDFs and image files before chunking and indexing
Have a suggestion? We'd love to hear from you! Contact us or contribute directly.
π₯ Contributors
π License
Distributed under the MIT License. See MIT License for more information.
Available Tools
13 toolsadd_document_to_pineconeA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| document | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
get_loinc_codesA
Get the most relevant LOINC codes for a given observation name.
The function automatically:
Filters for STATUS="ACTIVE" codes only
Sorts by COMMON_TEST_RANK (lower rank = more commonly used)
Returns codes in popularity order (most common first)
Your job is to:
Analyze returned codes for semantic relevance to the search query
Balance clinical popularity with semantic matching
Select codes that best match the intended observation
Strategy:
Start with default parameters (max_codes=5, max_fetch=50)
Check if result contains "Error" key in first element
If "Authentication failed" or "Authorization" error:
STOP using this tool immediately.
Do not retry with different parameters.
Report the authentication error to the user.
Suggest they check their LOINC API credentials.
Ask the user if they want to use your knowledge to find a LOINC code and wait for the confirmation. Add warning that this may cause wrong results.
If "No active LOINC codes found in current fetch":
Increase max_fetch progressively (50β100β200βRecordsFound).
Keep trying until max_fetch >= RecordsFound or you find active codes.
If "No LOINC codes found": Try alternative search terms or report failure.
If you get codes but they don't semantically match your query:
Increase max_codes to see more options.
Look for better matches in COMPONENT, SHORTNAME, LONG_COMMON_NAME fields.
Rules:
Function returns codes sorted by popularity - YOU decide which are most relevant.
Don't automatically pick the first (most common) codes.
Prioritize semantic relevance: exact matches in COMPONENT > SHORTNAME > partial matches.
Balance popularity with relevance (very rare codes might not be clinically useful).
Keep increasing max_fetch until you exhaust all available records (max_fetch >= RecordsFound).
Increase max_codes only when you need more options to find better semantic matches.
Args: component_name: The name of the observation to get the LOINC code for (i.e. "glucose"). max_codes: The maximum number of LOINC codes to return. max_fetch: The maximum number of LOINC codes to fetch from the API. Returns: LOINC codes sorted by popularity - you must select the most semantically relevant ones.
| Name | Required | Description | Default |
|---|---|---|---|
| max_codes | No | ||
| max_fetch | No | ||
| component_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses automatic behaviors (STATUS='ACTIVE' filter, COMMON_TEST_RANK sorting, popularity order) and error states ('Error' key, authentication failures, no active codes). This is exemplary transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is longer than average but well-structured with headings, bullet points, and numbered strategies. It front-loads the core purpose and automatic behaviors, then details a decision process. Some content (e.g., 'Your job is to...') is more agent instruction than tool description, but it remains organized and purposeful.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, the description does not need to explain return types. It covers all parameters, error handling, semantic selection strategy, and the balance between popularity and relevance. This makes it complete for a complex lookup tool with ambiguous result sets.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameter descriptions (0% coverage), so the description must compensate. It includes an 'Args' section defining all three parameters, including the distinction between max_codes and max_fetch, and the strategy section explains exactly how to tune them. This fully compensates for the missing schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource: 'Get the most relevant LOINC codes for a given observation name.' This clearly distinguishes it from sibling tools that request FHIR resources (e.g., request_patient_resource) by focusing on terminology lookup.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'Strategy' section provides explicit guidance on when to adjust max_fetch and max_codes, and when to stop on authentication errors. It gives clear context for use, though it does not explicitly name alternative tools or exclusion scenarios. Still, it offers more usage direction than most tool descriptions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_allergy_intolerance_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations only on the FHIR AllergyIntolerance resource. Rules: - When creating or updating an allergy intolerance, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting an allergy intolerance, ask the user for confirmation with details of the allergy intolerance and wait for the user's confirmation. - Provide links to the app (not api) allergy intolerance resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path (e.g., "/AllergyIntolerance", "/AllergyIntolerance?patient=Patient/123") body: Optional JSON data for POST/PUT requests)
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure and does so well. It explicitly states rules around data integrity (use only user-provided data, no guessing), requires confirmation before deletion, and mandates links to the app resource. These go beyond typical generic HTTP tool descriptions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized with a clear opening, bulleted rules, and an Args section. It is somewhat verbose but each sentence contributes relevant information, making it appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the generic HTTP request pattern and nested schema, the description covers purpose, parameters, key behavioral rules, and return type. It lacks details on authentication or error handling, but those are minor in this context and the provided information is sufficient for an agent to invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains all three parameters (method, path, body) with examples and clarifies that body is optional for POST/PUT, supplementing the schema's descriptions. It adds practical path examples (`/AllergyIntolerance?patient=Patient/123`) that help the agent construct valid requests.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool 'Makes an HTTP request to the FHIR server' and 'perform CRUD operations only on the FHIR AllergyIntolerance resource,' clearly identifying a specific verb and resource. It distinguishes itself from sibling resource-specific tools and generic_resource by limiting scope to AllergyIntolerance.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context: use this tool for CRUD operations specifically on AllergyIntolerance. It does not explicitly name alternatives or state when not to use it, but the resource-specific restriction makes the intended use unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_condition_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations only on the FHIR Condition resource. Rules: - When creating or updating a condition, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting a condition, ask the user for confirmation with details of the condition and wait for the user's confirmation. - Provide links to the app (not api) condition resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path (e.g., "/Condition", "/Condition?patient=Patient/123") body: Optional JSON data for POST/PUT requests)
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses important behaviors: use only user-provided data, do not auto-fill, ask confirmation for delete, and provide app links rather than API links. These go beyond basic CRUD semantics and help the agent act safely.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well structured with an intro, bulleted rules, and Args/Returns sections. The content is relevant, though the Returns line is somewhat redundant with the intro. Overall, concise and easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Provides useful CRUD rules and examples, but misses key context like the base URL expectation, error handling, and the nested request wrapper. As a generic FHIR request tool with no output schema, more details about invocation structure and edge cases are needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description lists method, path, and body, but the actual schema expects a single 'request' object wrapping these fields. This structural mismatch could cause incorrect invocation. Schema description coverage is 0%, so the description needed to clarify the wrapper but did not.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it makes HTTP requests to the FHIR server for CRUD operations specifically on the Condition resource, using a specific verb and resource. It distinguishes from sibling tools by restricting scope to Condition.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says 'only on the FHIR Condition resource', providing a clear when-not-to-use for other resources. It also gives contextual rules for create/update/delete (e.g., confirmation for deletion). Does not name alternative tools explicitly, but the scope restriction is effective.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_document_reference_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations only on the FHIR DocumentReference resource. Rules: - When creating or updating a document reference, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting a document reference, ask the user for confirmation with details of the document and wait for the user's confirmation. - Provide links to the app (not api) document reference resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path (e.g., "/DocumentReference", "/DocumentReference?patient=Patient/123") body: Optional JSON data for POST/PUT requests
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses behavioral traits: the 'Rules' section explains data fidelity expectations, deletion confirmation, and link requirements. This goes well beyond basic CRUD semantics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized with a clear opening line, a bulleted 'Rules' section, and a concise 'Args' list. Every sentence adds value, and the structure aids scannability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool's complexity (CRUD, confirmation steps, resource-specific constraints) is fully addressed. The description covers operational rules, parameters, and return type, making it complete for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description explains all three args (method, path, body) with examples and context. The example path clarifies usage, and the body description explicitly ties it to POST/PUT methods, adding meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Makes an HTTP request to the FHIR server' and specifically scopes to 'only on the FHIR DocumentReference resource.' This distinguishes it from sibling resource-specific tools with a clear verb-resource pairing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit rules define when to use this tool: CRUD operations on DocumentReference only. It also provides operation-specific guidance (e.g., delete requires user confirmation, don't invent data), effectively telling the agent when and how to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_encounter_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations only on the FHIR Encounter resource. Rules: - When creating or updating an encounter, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting an encounter, ask the user for confirmation with details of the encounter and wait for the user's confirmation. - Provide links to the app (not api) encounter resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path (e.g., "/Encounter", "/Encounter?patient=Patient/123") body: Optional JSON data for POST/PUT requests)
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and covers important behaviors: CRUD scope, data integrity rules, deletion confirmation, and return type. It lacks details on error handling or authentication, but the core behavioral traits are well disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is organized into clear sections (rules, args, returns) and contains no filler. It is slightly longer than necessary, but every sentence provides useful guidance or context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity and lack of annotations, the description is fairly complete: it specifies the resource scope, CRUD operations, user-data constraints, deletion confirmation, and return format. It doesn't mention authentication or error responses, but with an output schema present these are not critical gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description includes an Args section that explains method, path, and body, with an example path for Encounter resources. Although the input schema also describes method and path, the description adds clarity on body optionality and the path format, compensating for the 0% schema description coverage of the outer 'request' parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb and resource: 'Makes an HTTP request to the FHIR server' and 'perform CRUD operations only on the FHIR Encounter resource.' It effectively distinguishes itself from sibling tools like request_patient_resource and request_generic_resource by limiting its scope to encounters.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage rules: use only user-provided data for create/update, require confirmation for delete, and provide app links in responses. It also implicitly defines when not to use this tool (for non-Encounter resources), which is clear guidance against the sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_family_member_history_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations only on the FHIR FamilyMemberHistory resource. Rules: - When creating or updating a family member history, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting a family member history, ask the user for confirmation with details of the family member history and wait for the user's confirmation. - Provide links to the app (not api) family member history resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path (e.g., "/FamilyMemberHistory", "/FamilyMemberHistory?patient=Patient/123") body: Optional JSON data for POST/PUT requests)
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by adding key constraints: using only user-provided data, requiring confirmation for delete, and providing app-specific links. It also describes the return as 'JSON response from the FHIR server.' While it does not mention authentication or side effects verbosely, the provided rules go beyond the schema and give meaningful behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured: a one-sentence purpose statement, followed by a bulleted list of rules, then an Args section. Each sentence earns its place; there is no redundant filler. It is slightly long due to the rules, but they are essential for safe usage. Front-loaded purpose makes it easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity as a CRUD wrapper with multiple methods, the description covers resource-specific constraints, argument details, and return format. Since an output schema exists, the description does not need to enumerate response fields. It provides sufficient context for an agent to select and use the tool correctly, though it could mention error handling or authentication without making it notably more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the schema describes method and path, the description's Args section adds practical meaning with examples (e.g., path format '/FamilyMemberHistory?patient=Patient/123') and clarifies body usage. Given that the context reports 0% schema description coverage, the description compensates effectively by explaining each parameter's role and providing examples, adding value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Makes an HTTP request to the FHIR server' and specifically scopes it to 'CRUD operations only on the FHIR FamilyMemberHistory resource.' This distinguishes it from sibling tools for other FHIR resources and the generic resource tool. The verb 'perform CRUD operations' and the explicit resource name make the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context by stating the tool should be used 'only on the FHIR FamilyMemberHistory resource,' which serves as an exclusionary guideline. It also includes operational rules, such as not guessing missing data and requiring user confirmation before deletion, which guide when specific actions are appropriate. However, it does not explicitly mention alternative tools by name, so there is no strong 'use X instead' guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_generic_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations on any FHIR resource ONLY if the other tools are not applicable.
Rules: - When creating or updating a resource, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting a resource, ask the user for confirmation with details of the resource and wait for the user's confirmation. - Provide links to the app (not api) resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path body: Optional JSON data for POST/PUT requests)
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It discloses important traits: do not guess data, require confirmation for deletions, and provide app links in responses. It lacks details on authentication, rate limits, or error handling, but the provided rules are substantial and relevant.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear purpose, bullet-point rules, and an Args list. It is not overly verbose; each section serves a purpose. The rules section is somewhat lengthy but all are relevant behavioral guidelines.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a generic fallback tool with an output schema present, the description covers the core operations, safety rules, and return type. It does not explain error handling or path construction details, but given the availability of specialized sibling tools, the completeness is adequate for the intended role.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% at the tool level, but the Args section adds meaning: 'method: HTTP method (GET, POST, PUT, DELETE)', 'path: Resource path', 'body: Optional JSON data for POST/PUT requests'. This compensates for the schema's lack of top-level description and clarifies parameter usage, though it could be more detailed (e.g., path format).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb and resource: 'Makes an HTTP request to the FHIR server' and 'perform CRUD operations on any FHIR resource'. It explicitly distinguishes from siblings with 'ONLY if the other tools are not applicable', making it a specific generic fallback tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit when-to-use guidance: 'Use this tool ... ONLY if the other tools are not applicable.' It also provides operational rules for create/update/delete (e.g., 'When deleting a resource, ask the user for confirmation') that clarify acceptable usage contexts.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_immunization_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations only on the FHIR Immunization resource. Rules: - When creating or updating an immunization, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting an immunization, ask the user for confirmation with details of the immunization and wait for the user's confirmation. - Provide links to the app (not api) immunization resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path (e.g., "/Immunization", "/Immunization?patient=Patient/123") body: Optional JSON data for POST/PUT requests)
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose key behaviors: it performs mutating CRUD operations, requires confirmation for deletes, forbids auto-filling data, and mandates app links in the response. However, it lacks details on authentication, error handling, or permission requirements, so it's not fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is reasonably concise and well-structured: a clear opening, a bulleted list of rules, and an Args/Returns section. The rules are valuable but add length, so it doesn't achieve a perfect 5.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential CRUD operation flow and return type, and includes important deletion confirmation. However, it omits how to handle the nested 'request' parameter correctly and doesn't discuss error responses, status codes, or pagination, leaving gaps for a CRUD tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains method, path, and body with an example path, adding some value beyond the schema. However, it presents these as top-level args while the schema wraps them in a single 'request' object, which could confuse an agent. This mismatch means the description only partially compensates for the schema's minimal descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it makes HTTP requests to the FHIR server and specifically targets the FHIR Immunization resource with CRUD operations. This separates it from sibling tools that handle other resource types, such as request_patient_resource or request_observation_resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly scopes usage to the Immunization resource and provides important behavioral rules: using only user-provided data, not guessing missing data, asking for confirmation before deletion, and providing app (not API) links. While it doesn't directly mention alternatives, the resource-specific scope makes the appropriate tool choice clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_medication_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations only on the FHIR Medication resource. Rules: - When creating or updating a medication, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting a medication, ask the user for confirmation with details of the medication and wait for the user's confirmation. - Provide links to the app (not api) medication resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path (e.g., "/Medication", "/Medication?code=aspirin") body: Optional JSON data for POST/PUT requests)
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility. It discloses CRUD behavior, data handling rules (no guessing/auto-filling), the need for deletion confirmation, and the requirement to return app links. It also states the response format (JSON).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a purpose statement, rules, Args, and Returns sections. It avoids unnecessary verbosity while including all critical information. A slight length increase is justified by the operational rules.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema, and the description explains the JSON response. It covers essential behaviors like CRUD scope, deletion confirmation, and link requirements. It could mention authentication or error handling, but for a FHIR resource client this is sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description provides an Args section that clearly explains method, path, and body, including examples like '/Medication?code=aspirin'. Since schema description coverage is 0%, this is essential and adds meaningful context beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs HTTP requests for CRUD operations exclusively on the FHIR Medication resource. This differentiates it from sibling resource-specific tools like request_patient_resource and request_generic_resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says to use this tool for CRUD operations only on the Medication resource, which provides clear scope. It also provides rules for creating/updating (use only user data) and deleting (ask confirmation). However, it does not explicitly mention alternatives for non-Medication resources.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_observation_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations only on the FHIR Observation resource.
IMPORTANT: Before fetching observations that require LOINC codes:
First use get_loinc_code() tool to find appropriate LOINC codes
Then use this tool to fetch the observation with the LOINC code
Rules: - When creating or updating an observation, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting an observation, ask the user for confirmation with details of the observation and wait for the user's confirmation. - Provide links to the app (not api) observation resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path (e.g., "/Observation?subject:Patient.name=Homer%20Simpson") body: Optional JSON data for POST/PUT requests)
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full transparency burden. It discloses key behaviors: it performs CRUD, requires user-provided data without guessing, mandates confirmation before deletion, and returns JSON. It also notes the need to provide app links rather than API links. This goes beyond a simple 'makes HTTP request' statement and gives the agent actionable behavioral context, though it omits auth and error-handling details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is longer than typical but well-structured with clear sections for the workflow, rules, args, and returns. It front-loads the core purpose and uses bullets for rules. Every section serves a purpose; however, the volume of text could be trimmed slightly without losing essential information, so it's not a perfect 5.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that this is a generic HTTP tool for a specific resource, the description is complete: it covers the operation, the resource scope, preconditions (LOINC workflow), safety rules, parameter semantics, and return format. The output schema exists, so return values need not be detailed further. Sibling differentiation is adequate through the resource-specific wording.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage for the top-level 'request' parameter, but the description's Args section explains each inner field with practical details: method enumerates HTTP verbs, path includes a concrete example with URL encoding, and body is described as optional JSON. This significantly adds meaning beyond the schema's terse descriptions and helps the agent construct valid requests.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool makes HTTP requests to the FHIR server and explicitly scopes it to 'CRUD operations only on the FHIR Observation resource.' This distinguishes it from sibling tools that handle other FHIR resources and from request_generic_resource. The verb 'request' combined with the resource name is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage guidance: use this tool only for Observation resource operations, and includes a specific workflow ('First use get_loinc_code() tool... Then use this tool') for LOINC-dependent observations. It also gives explicit rules for creation, update, delete (requiring confirmation), and response formatting. While it doesn't name alternative tools for other resources, the resource-specific scope effectively implies when to use this tool vs siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_patient_resourceA
Makes an HTTP request to the FHIR server. Use this tool to perform CRUD operations only on the FHIR Patient resource. Rules: - When creating or updating a patient, use only the data explicitly provided by the user. - Do not guess, auto-fill, or assume any missing data. - When deleting a patient, ask the user for confirmation with details of the patient and wait for the user's confirmation. - Provide links to the app (not api) patient resource in the final response.
Args: method: HTTP method (GET, POST, PUT, DELETE) path: Resource path (e.g., "/Patient", "/Patient?name=John%20Doe") body: Optional JSON data for POST/PUT requests)
Returns: JSON response from the FHIR server
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 important behavioral rules: not guessing or auto-filling data, asking for confirmation before deletion, and providing app (not api) links in the final response. It also states the return value is a JSON response. However, it omits authentication, error handling, and row-level side effects, though the CRUD nature is clear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is slightly long but well-structured into sections for purpose, rules, and args. Every sentence earns its place, including the important deletion confirmation rule and the no-guessing rule. It remains accessible despite the length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simple structure (one parameter with a nested schema) and the presence of an output schema, the description covers the core needs: purpose, usage rules, and parameter details. It does not explain error handling or auth, but for a CRUD tool with clear rules and an output schema, this is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no description for the top-level 'request' parameter (0% coverage), so the description must compensate. It explains method, path, and body with examples, which adds meaning. However, it presents these as top-level arguments rather than nested within a 'request' object, creating a structural mismatch that could mislead an agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it makes HTTP requests to the FHIR server for the Patient resource only, using the verb 'perform CRUD operations'. It explicitly restricts usage to the Patient resource, distinguishing it from sibling tools like request_observation_resource or request_generic_resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Use this tool to perform CRUD operations only on the FHIR Patient resource', providing clear context for when to use it. It does not explicitly name alternative tools for other resources, but the resource-specific restriction implies exclusions. Rules for creating/updating/deleting add valuable usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_pineconeA
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. Searches the Pinecone vector index for information related to the given document by FHIR DocumentReference ID.
Use this tool when the user requests information from the documents, notes, etc.
Rules: - Firstly, prepare fhir_document_id by running the appropriate tool. - If the error message "Document does not exist in Pinecone index" is returned, automatically trigger the 'add_document_to_pinecone' tool to add the missing document to the index. - Translate the user's query into the language of the document before performing the search. - Base all answers strictly on the content found in the Pinecone index documents. - If the user's question is unrelated to the indexed documents, respond that the information is not available in the documents. - If the query is unclear or ambiguous, ask the user to clarify or provide more details. - You can modify the query to make it more specific and relevant to the document.
Args: query (str): The user's search query. fhir_document_id (str): The ID of the FHIR DocumentReference resource to search within - it is the same as the FHIR ID of the document. top_k (int, optional): The maximum number of search results to return. Defaults to 10.
Returns: list[PineconeSearchResponse]: List of search results matching the query. PineconeError: Error object with a message if the search fails.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| top_k | No | ||
| fhir_document_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses important behaviors: the delay due to embedding model loading, query language translation, strict grounding in indexed documents, and the automatic fallback to add_document_to_pinecone. This far exceeds minimal expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with an IMPORTANT callout, a concise purpose statement, a rules list, and clearly labeled Args/Returns sections. It is longer than necessary but every sentence contributes operational guidance without waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity and lack of annotations, the description is remarkably complete. It covers prerequisites, error handling, language translation, answer scope, ambiguity handling, and query modification. Output schema exists, so return details need no elaboration.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage, but the Args section explains all three parameters. It clarifies fhir_document_id as 'the same as the FHIR ID of the document,' which adds valuable meaning. query and top_k are adequately described, though query is somewhat generic.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action: 'Searches the Pinecone vector index for information related to the given document by FHIR DocumentReference ID.' This clearly distinguishes it from sibling tools like add_document_to_pinecone and request_document_reference_resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use this tool when the user requests information from the documents, notes, etc.' and provides detailed rules including prerequisites (prepare fhir_document_id), fallback (trigger add_document_to_pinecone on error), and handling of unrelated queries.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
13 tool updates
v0.1.0- First observed
add_document_to_pinecone - First observed
get_loinc_codes - First observed
request_allergy_intolerance_resource - First observed
request_condition_resource - First observed
request_document_reference_resource - First observed
request_encounter_resource - First observed
request_family_member_history_resource - First observed
request_generic_resource - First observed
request_immunization_resource - First observed
request_medication_resource - First observed
request_observation_resource - First observed
request_patient_resource - First observed
search_pinecone
TDQS
Scored across 13 tools
The request_*_resource tools are clearly separated by FHIR resource type, and request_generic_resource is explicitly a fallback for resources without a dedicated tool. However, the similar structure and the note in request_observation_resource referencing a non-existent 'get_loinc_code' tool could cause slight confusion.
The CRUD tools follow a strong request_<resource>_resource pattern, making the set predictable. The utility tools (get_loinc_codes, add_document_to_pinecone, search_pinecone) diverge in style but are still verb-first and understandable.
13 tools is well within the ideal range for a FHIR server covering multiple resource types. The number is neither bloated nor thin, given the broad scope of FHIR.
The set covers CRUD for the most common FHIR resources plus a generic fallback for all others, and adds LOINC lookup and document search. Minor gaps like a dedicated search/query tool or terminology service exist, but the generic resource tool covers most needs.
Maintenance
Related MCP Connectors
Guardrailed FHIR access for AI agents: PHI redaction, audit trail, step-up auth, tenant isolation
Privacy-preserving synthetic health data generation. FHIR R4/R5 compliant.
- mcpOAuthcom.medplum
Securely access and manage FHIR healthcare data stored in Medplum.
Medical RAG: semantic search for clinical guidelines, drug interactions, diagnoses & EHR data.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables seamless integration with FHIR APIs for healthcare applications, allowing users to search, retrieve, create, update, and analyze clinical information through natural language interactions. Supports SMART-on-FHIR authentication and works with various healthcare systems like EPIC and HAPI FHIR servers.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables LLMs to securely interact with FHIR healthcare servers and HL7 terminology services. Provides comprehensive healthcare data operations with built-in PHI protection, audit logging, and SMART on FHIR authentication.MIT
- FlicenseAqualityDmaintenanceProvides read/write access to any FHIR-compliant healthcare API with built-in validation, supporting resource management, search operations, and granular permissions through natural language.51-
- AlicenseAqualityCmaintenanceProvides seamless integration with FHIR APIs, enabling AI/LLM tools to search, retrieve, and analyze clinical healthcare data with support for SMART-on-FHIR authentication and multiple transport protocols.7120 PyPI135Apache 2.0