Skip to main content
Glama
aks129

HealthClawGuardrails

by aks129

Extract Form Data to FHIR

questionnaire_extract
Destructive

Extract FHIR resources from a completed QuestionnaireResponse into a transaction Bundle. Preview via dry_run before committing; requires step-up authorization.

Instructions

SDC $extract — extract FHIR resources from a completed QuestionnaireResponse into a transaction Bundle. Write tier; requires step-up authorization, including for dry_run=true previews.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview the Bundle without committing
questionnaireNoThe referenced Questionnaire (optional if resolvable by reference)
questionnaire_responseYesCompleted QuestionnaireResponse

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false, but the description adds valuable context: it requires step-up authorization even for dry_run=true previews. This goes beyond the annotations and clarifies that the operation is sensitive. However, it does not specify whether the extraction itself commits or merely returns a Bundle, leaving some behavioral ambiguity.

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?

The description is a single sentence that front-loads the primary action, names the output, and includes a critical authorization note. Every word earns its place with no filler or redundancy.

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?

For a tool with no output schema and nested object parameters, the description should clarify whether the transaction Bundle is returned or committed. It mentions the Bundle as the target but does not explicitly state the tool's side effects or return value beyond that. The authorization note is useful, but the ambiguity about commit vs. extract leaves a gap for agents deciding whether to use this or fhir_commit_write.

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?

The input schema has 100% description coverage for all three parameters, so the baseline is 3. The description mentions dry_run in the authorization context, reinforcing the parameter's purpose, but adds no new syntax or format details beyond what the schema already provides. No extra compensation is needed.

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 names a specific operation (SDC $extract) and a concrete resource (completed QuestionnaireResponse) plus the output (transaction Bundle). It clearly distinguishes itself from siblings like questionnaire_populate (which populates a form) and fhir_commit_write (which commits a bundle), making its purpose unambiguous.

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 states the core action and notes the write tier and authorization requirement, but does not explicitly enumerate when to use this tool versus alternatives or provide exclusion conditions. The 'Write tier' phrase hints at a context but does not guide an agent on when to prefer this over fhir_propose_write or fhir_commit_write.

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