Skip to main content
Glama
fhir-journey-mcp
by Ath404

Follow-ups due

fhir_find_followups_due

Find discharged patients with no live follow-up booked within a set window. Returns overdue and upcoming contacts, oldest discharge first, for outreach scheduling.

Instructions

Finished encounters that ended in a date range with no live follow-up appointment booked within withinDays of discharge. Cancelled or no-show follow-ups do not count as booked. Returns the patients to contact, oldest discharge first, whether the window has already closed (overdue) or can still be met, and any follow-up booked too late.

Input Schema

NameRequiredDescriptionDefault
tagNoRestrict to resources carrying this meta.tag, as `system|code` or `code`. Useful for scoping to one tenant or one demo dataset.
withinDaysNo
dischargedToNoDefaults to now.
maxEncountersNo
dischargedFromYes
encounterClassNov3 ActCode, e.g. IMP (inpatient), EMER, AMB.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it defines what counts as 'booked' (cancelled/no-show excluded), specifies result ordering (oldest discharge first), and describes the returned state (overdue vs. still-met, plus late bookings). It omits truncation/pagination behavior for maxEncounters and any permission context.

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?

Two sentences, front-loaded with the cohort definition followed by exclusions and return semantics; every clause earns its place. Slightly dense with parenthetical output detail, but no filler.

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

Completeness4/5

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

No annotations and no output schema, so the description must supply both safety framing and return shape, and it does define the result contents and ordering. Gaps remain around truncation (maxEncounters cap of 200), tag-based scoping, and encounterClass meaning for a 6-parameter clinical query.

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 coverage is only 50%, and withinDays has no schema description at all, so the description's gloss ('booked within withinDays of discharge') is genuinely additive. However, tag, encounterClass, and maxEncounters are unexplained in either place, leaving half the parameters ambiguous.

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 states a precise cohort: finished encounters whose discharge date falls in a range and that lack a live follow-up booked within withinDays. That 'find the gap' verb/resource pair is clearly distinguishable from the sibling list/search tools (fhir_list_appointments, fhir_find_open_slots) without opening a schema.

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?

Usage is implied by the cohort definition (call this to surface patients needing follow-up contact), but there is no explicit when-to-use/when-not guidance and no sibling is named as an alternative. An agent can infer intent but must guess the boundary with fhir_list_appointments.

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