Skip to content

[UX] Add machine-readable MCP failure markers #63

Description

@StatPan

Parent: #60
Blocks: verification and workflow tickets that need reliable error semantics.

Goal

Add a shared response contract for machine-readable failures so LLM clients do not treat missing official data as permission to invent an answer.

Proposed Markers

  • [NOT_FOUND]: official lookup completed and no matching data was found.
  • [AMBIGUOUS]: multiple plausible official matches require disambiguation.
  • [VERIFY_FAILED]: a user-provided claim conflicts with official data.
  • [API_FAILED]: official API call failed, timed out, or returned invalid data.
  • [PARTIAL]: workflow returned useful data but one or more sections failed.

Scope

  • Add small helper functions or response models for marker payloads.
  • Include attempted queries, source tools, suggested next queries, and an LLM instruction.
  • Do not refactor every existing tool at once; wire the helper into new UX tools first.

Acceptance Criteria

  • Shared marker helper or model exists.
  • Unit tests cover all marker types.
  • Invalid input can be represented without free-form-only strings.
  • Marker payload includes enough detail for client recovery.
  • No existing successful response schema is broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aiAI and agent workflow behavior.enhancementNew feature or requeststatus:readyReady to start.type:taskConcrete implementation task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions