Skip to content

v0.5.0 — structured outputs and modular server

Choose a tag to compare

@mshegolev mshegolev released this 04 Nov 06:54
· 21 commits to main since this release

Big one. Every tool is now a fully typed MCP citizen: outputSchema,
structuredContent, and the markdown text block you liked are now all
present on every response.

Added

  • TypedDict output schemas for all 23 tools (new models.py) —
    FastMCP auto-generates an outputSchema from the return annotation
    and exposes the typed payload as structuredContent on every tool
    result.
  • Dual-channel responses via CallToolResult — the content
    block still carries the compact markdown rendering (context-efficient
    for agents), while structuredContent carries the full validated
    payload (for clients that can render / process structured data).
  • New output.py with ok() (builds the CallToolResult) and
    fail() (raises ToolError wrapping the actionable error
    message). All 23 tools share this pattern.

Changed

  • Server split into domain modules: the 1500-line server.py is
    now a thin composition point; tools live under tools/
    (pipelines.py, schedules.py, branches_tags.py, mrs.py,
    repo.py), MCP resources in resources.py, and shared FastMCP
    instance + lifespan + helpers in _mcp.py.
  • Shared helpers _get_ci / _ts / _is_secret_key /
    _mask_variables renamed without the leading underscore and moved
    to _mcp (they are no longer single-module private).
  • Error path is now uniform: tools raise ToolError(errors.handle(…))
    and FastMCP reports the result as isError=True — no more
    string-based error returns.

Removed

  • response_format parameter (breaking): no longer needed because
    every tool now returns both markdown and structured data. Existing
    callers that passed response_format='markdown' or 'json' must
    drop the argument — markdown remains the text content by default,
    structured data is on result.structuredContent.
  • Dead code from ci_manager.py: wait_for_pipeline,
    ScheduleCompareResult (unused from the MCP path).

Migration notes (v0.4.x → v0.5.0)

  • Tools no longer return plain strings. If you call them programmatically,
    inspect result.structuredContent for the typed payload and
    result.content[0].text for the markdown summary.
  • Module imports moved: from gitlab_ci_mcp.server import mcp still
    works, but tool functions now live under gitlab_ci_mcp.tools.*.