Skip to main content
Glama
aks129

HealthClawGuardrails

by aks129

Propose Data Quality Fix

curatr_apply_fix
Read-only

Propose FHIR data quality fixes as a patient-approved draft. Returns an action ID; on approval, applies the fix once with linked Provenance, rejecting if the record changed.

Instructions

Propose data quality fixes to a FHIR resource as a 'curatr-fix' action on the action rail. Nothing changes when this is called: it returns a draft (action id) the patient must submit with action_commit and then approve out of band on their own review page; only that approval carries the fix out, once, with a linked Provenance record. The proposal is pinned to the record's current meta.versionId — pass record_version from the record you read, or omit it and the tool reads it for you — and is refused at execution if the record has changed since. Only fields the Curatr evaluator can propose are accepted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fixesYesList of field fixes to apply. Each fix has 'field_path' (dot-notation, e.g. 'Condition.code.coding[0].system') and 'new_value' (the corrected value).
reasonNoWhat the fix does, in words the patient will read on the approval page. Defaults to a description built from the field paths.
resource_idYesID of the resource to fix
resource_typeYesFHIR resource type to fix (e.g. 'Condition')
patient_intentYesPlain-language reason for the fix, provided by the patient (recorded in Provenance).
record_versionNoThe record's meta.versionId as you read it. Omit to have the tool read the current version before proposing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "What the fix does, in words the patient will read on the approval page. Defaults to a description built from the field paths.",
      +  "type": "string"
      +}
    • addedInput schema / properties / record_version
      Added value: +{
      +  "description": "The record's meta.versionId as you read it. Omit to have the tool read the current version before proposing.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. First observedv1.8.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint=true annotation, the description fully discloses the non-mutating draft behavior, the two-phase approval requirement, the version pinning with refusal-on-change, and the linked Provenance record on the eventual execution. This is rich, accurate behavioral context that no structured field conveys.

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?

Three sentences, each earning its place: the first states purpose, the second details workflow and non-effect, the third explains version pinning and field restrictions. It is front-loaded with the most important fact (proposal, not execution) and contains no filler.

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

Completeness5/5

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

Despite having no output schema, the description tells the agent what it returns ('a draft (action id)'), the required subsequent step (action_commit), the out-of-band approval, and the concurrency guard. For a tool that is one step in a multi-step workflow, this is as complete as an agent needs to invoke it correctly.

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?

With 100% schema description coverage, the baseline is 3, but the description adds meaningful semantics: it explains that record_version can be omitted and the tool reads the current version, and it restricts fixes to fields the evaluator can propose. These clarifications go beyond the schema's literal parameter descriptions and help the agent choose correct values.

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 ('Propose data quality fixes to a FHIR resource as a 'curatr-fix' action') and immediately clarifies that it is a proposal, not an execution ('Nothing changes when this is called'). It distinguishes itself from siblings like action_commit and fhir_propose_write by explicitly framing the draft-then-commit workflow, leaving no ambiguity about the tool's role.

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

Usage Guidelines5/5

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

The description explicitly names the next step in the workflow ('the patient must submit with action_commit') and states what this tool does not do ('Nothing changes when this is called'), giving clear when-to-use/when-not-to-use guidance. It also signals a dependency on the Curatr evaluator by declaring 'Only fields the Curatr evaluator can propose are accepted,' effectively telling the agent to consult curatr_evaluate first.

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