Skip to main content
Glama
aks129

HealthClawGuardrails

by aks129

Generate SMART Health Link

shl_generate

Create a SMART Health Link to share a patient's record with a clinic while keeping data confidential. Encrypts the share-bundle client-side and returns a shlink URI, viewer link, and patient-only manage link.

Instructions

Generate a SMART Health Link (shlink:/ QR payload) sharing the patient's record with a clinic. Fetches the guardrailed share-bundle from HealthClaw (step-up required — supplied by the deployment as an X-Step-Up-Token header), encrypts it client-side (the SHL server never sees plaintext), uploads ciphertext, and returns the shlink URI, viewer link, and the patient's private manage link. ALWAYS get the patient's explicit consent before generating, and deliver the manage link ONLY to the patient.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoShort label shown in SHL viewers (<=80 chars), e.g. 'Records for Winters Healthcare'. No PHI beyond what the patient approves.
profileNointake = identified record for clinic check-in (default); deidentified = strips name/contact/institutional IDs
patient_idNoOptional patient id filter for multi-patient tenants
expires_in_daysNoLink lifetime in days (default 7, max 90)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes far beyond the annotations by revealing a step-up authentication requirement via the X-Step-Up-Token header, client-side encryption with the server never seeing plaintext, and the returned artifacts (shlink URI, viewer link, private manage link). It also discloses the consent and privacy obligations. This fully carries the behavioral burden for a write operation.

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 compact and well-ordered: purpose first, process next, safety obligations last. Three sentences contain zero filler, and each sentence contributes either behavioral detail or critical usage constraints.

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?

Even though there is no output schema, the description names all three returned artifacts and explains the encryption, auth, and consent requirements. For a four-parameter, all-optional tool with this level of process complexity, an agent has everything needed to invoke it correctly.

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?

Schema description coverage is 100%, so the baseline is 3. The description discusses the overall process but does not add parameter-specific detail; however, the schema already thoroughly documents each parameter (label, profile, patient_id, expires_in_days), so no 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?

States a specific verb and resource: 'Generate a SMART Health Link (shlink:/ QR payload) sharing the patient's record with a clinic.' This clearly distinguishes it from all listed siblings — none of which mention SHL generation or QR payloads — so an agent can identify the correct tool immediately.

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 conveys the use context: sharing a patient's record with a clinic. It also provides critical operational guidance, such as requiring explicit patient consent and delivering the manage link only to the patient. It does not explicitly name alternatives or exclusions, but no sibling performs a comparable SHL generation function, so the context is sufficient.

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