Skip to main content
Glama

Draft an appeal letter (Pro or Scale plan)

draft_appeal
Idempotent

Generate an appeal letter for a denial, assembled deterministically from cited facts. REQUIRES A PRO OR SCALE PLAN. Called by an anonymous caller or a key on the free plan, this returns an upgrade_required error naming the pricing page - it never fabricates or partially generates a letter for a caller who cannot access the feature. The letter argues the billing question only: it never asserts anything about the patient's clinical condition. Any fact only the practice holds (providerName, claimNumber, dateOfService, codes, the signature) that is not supplied is rendered as an explicit "[TO BE COMPLETED BY PRACTICE]" placeholder in the letter body and listed by name in placeholders, never invented. grounded is true only when we hold the CARC supplied and could argue it with our own corrective-action data; when false, the letter still assembles around payer/claim details and any practiceNote given, but the substantive grounds section is left as a placeholder for the practice to write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
carcYesCARC code from the remittance, e.g. "CO-45" or "45".
rarcNoOptional RARC codes on the same remittance line.
codesNoOptional procedure codes at issue, numeric reference only.
payerSlugNoOptional payer slug, to cite that payer's appeal policy and window.
claimNumberNoOptional. Rendered as a placeholder if omitted.
practiceNoteNoOptional free-text detail from the practice, appended to the argument section.
providerNameNoOptional. Rendered as a placeholder if omitted.
dateOfServiceNoOptional, ISO yyyy-mm-dd. Rendered as a placeholder if omitted.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changed
    • changedInput schema / properties / dateOfService / description
      Previous value: -"Optional. Rendered as a placeholder if omitted."New value: +"Optional, ISO yyyy-mm-dd. Rendered as a placeholder if omitted."
    • addedInput schema / properties / dateOfService / format
      Added value: +"date"
    • addedInput schema / properties / dateOfService / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}$"
    • addedInput schema / properties / payerSlug / enum
      Added value: +[
      +  "medicare",
      +  "medicaid",
      +  "aetna",
      +  "cigna",
      +  "unitedhealthcare",
      +  "anthem-bcbs",
      +  "bcbs-general",
      +  "humana",
      +  "kaiser-permanente",
      +  "tricare",
      +  "molina",
      +  "centene-ambetter",
      +  "oscar-health",
      +  "bright-health",
      +  "wellcare",
      +  "highmark",
      +  "horizon-bcbs",
      +  "independence-blue-cross",
      +  "emblemhealth",
      +  "health-net"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only indicate idempotency and non-destructiveness. The description adds substantial behavioral detail: deterministic assembly, access control, the 'never fabricates' guarantee, explicit placeholders for missing facts, and the 'grounded' flag semantics. This greatly exceeds annotation coverage.

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 description is long but every sentence carries essential constraints—purpose, plan requirement, placeholder behavior, and grounded semantics. It front-loads the core function and then logically layers edge cases. Slightly verbose but well-structured.

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?

With 8 parameters, no output schema, and access-control nuance, this description is exceptionally complete. It covers required plan, error behavior, deterministic assembly, placeholder rules, billing-only scope, and the meaning of the 'grounded' flag—all relevant for invocation. No gaps remain.

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 descriptions cover 100% of the 8 parameters, so baseline is 3. The description adds critical semantics beyond schema: it explains how missing optional fields become '[TO BE COMPLETED BY PRACTICE]' placeholders and that codes are numeric reference only. This elevates the score to 4.

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+resource pair: 'Generate an appeal letter for a denial, assembled deterministically from cited facts'. This clearly differentiates it from sibling tools like explain_denial or check_claim, which have different actions and outputs.

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?

Explicitly states the Pro/Scale plan requirement including the upgrade_required error for unauthorized callers, giving clear access context. It doesn't name sibling alternatives, but the purpose is distinct enough that when-to-use is implied without confusion.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct function: claim checking, appeal drafting, denial explanation, MUE lookup, NCCI edits lookup, and timely filing. There is no overlap in purpose, and the descriptions make the boundaries clear.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (check_claim, draft_appeal, explain_denial, get_mue, get_ncci_edits, get_timely_filing). The verbs are specific and the nouns are meaningful, creating a predictable and readable naming scheme.

Tool Count5/5

Six tools is well within the ideal range for a focused server. The count feels appropriate for the denial management domain, with each tool earning its place and no redundancy.

Completeness5/5

The toolset covers the full denial lifecycle: pre-claim checking (check_claim), denial explanation (explain_denial), appeal drafting (draft_appeal), and supporting lookups (get_mue, get_ncci_edits, get_timely_filing). No obvious gaps exist for the stated purpose.

Resources