Skip to content

feat(server): lazy-load Pydantic outputSchema generation to avoid storyboard readiness flake #412

@bokelley

Description

@bokelley

Context

_apply_pydantic_schemas in src/adcp/server/mcp_tools.py runs at import time and generates output schemas for every tool. This coincides with a multi-PR batch of storyboard "Agent unreachable" failures observed across PRs #391, #405, #406, #407.

Deferring schema generation to the first tools/list call should restore predictable boot times and eliminate the readiness race.

Acceptance Criteria

  • _apply_pydantic_schemas is invoked lazily (first tools/list call), not at import
  • Measured import-time delta documented in PR description
  • Storyboard runs no longer flake with "Agent unreachable" on the affected PRs

Refs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions