Skip to main content
Glama
FHIR MCP Server

FHIR MCP Server

by wso2

delete

Remove a single FHIR resource by logical ID or conditional search parameters, or run a named FHIR operation such as $expunge and return an OperationOutcome.

Instructions

Execute a FHIR delete interaction on a specific resource instance. Use this tool when you need to remove a single resource identified by its logical ID or optionally filtered by search parameters. The optional id parameter must match an existing resource instance when present. If you include searchParam, the server will perform a conditional delete, deleting the resource only if it matches the given criteria. If you supply operation, it will execute the named FHIR operation (e.g., $expunge) on the resource. This tool returns a FHIR OperationOutcome describing success or failure of the deletion.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "type": "<type>"
    },
    "name": "delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoThe logical ID of a specific FHIR resource instance.
typeYesThe FHIR resource type name. Must exactly match one of the resource types supported by the server.
operationNoThe name of a custom FHIR operation or extended query defined for the resourceMust match one of the operation names returned by `get_capabilities`.
searchParamNoA mapping of FHIR search parameter names to their desired values. These parameters refine queries for operation-specific query qualifiers. Only parameters exposed by `get_capabilities` for that resource type are valid.

Output Schema

NameRequiredDescriptionDefault
resultYesA dictionary containing the confirmation of deletion or details on why deletion failed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "additionalProperties": true,
      +      "description": "A dictionary containing the confirmation of deletion or details on why deletion failed.",
      +      "title": "Result",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "title": "deleteOutput",
      +  "type": "object"
      +}
  2. First observedv0.9.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose conditional-delete semantics, operation invocation, the requirement that id match an existing instance, and that it returns an OperationOutcome. The major gap is safety: it never says whether the deletion is permanent or a reversible/soft delete, nor what permissions are required for a destructive FHIR interaction.

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 definition is front-loaded with the core purpose and then walks through each optional parameter in order, with no filler sentences. It is slightly verbose in restating the return type that the output schema already covers, but nothing is genuinely wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Because an output schema exists, the return-value sentence is a bonus rather than a necessity, and the parameter behavior is well covered. What remains missing for a destructive, annotation-free mutation tool is guidance on irreversibility and authorization, which an agent would need before invoking it on a live resource.

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 coverage is 100%, so baseline is 3, but the description adds genuine meaning the schema does not: it explains that supplying searchParam triggers a conditional delete gated on matching criteria, and that operation runs a named FHIR operation such as $expunge. It also clarifies the id-must-exist constraint, though it doesn't explain how id, searchParam, and operation combine or conflict.

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 opens with a specific verb and resource ('Execute a FHIR `delete` interaction on a specific resource instance') and immediately scopes it to a single instance, which cleanly separates it from siblings like read, create, and update. It also names the three distinct modes (by id, conditional by searchParam, or via a named operation) so the agent knows the full surface of the tool.

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?

It gives an explicit trigger: 'Use this tool when you need to remove a single resource identified by its logical ID or optionally filtered by search parameters.' However, it never names an alternative or states a when-not condition (e.g., bulk deletion, or using update to retire a resource), so the routing guidance is clear but open-ended.

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

Deploy Server

Other Tools