Repository navigation
v0.5.0 — structured outputs and modular server
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 anoutputSchemafrom the return annotation
and exposes the typed payload asstructuredContenton every tool
result. - Dual-channel responses via
CallToolResult— thecontent
block still carries the compact markdown rendering (context-efficient
for agents), whilestructuredContentcarries the full validated
payload (for clients that can render / process structured data). - New
output.pywithok()(builds theCallToolResult) and
fail()(raisesToolErrorwrapping the actionable error
message). All 23 tools share this pattern.
Changed
- Server split into domain modules: the 1500-line
server.pyis
now a thin composition point; tools live undertools/
(pipelines.py,schedules.py,branches_tags.py,mrs.py,
repo.py), MCP resources inresources.py, and shared FastMCP
instance + lifespan + helpers in_mcp.py. - Shared helpers
_get_ci/_ts/_is_secret_key/
_mask_variablesrenamed 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 asisError=True— no more
string-based error returns.
Removed
response_formatparameter (breaking): no longer needed because
every tool now returns both markdown and structured data. Existing
callers that passedresponse_format='markdown'or'json'must
drop the argument — markdown remains the text content by default,
structured data is onresult.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,
inspectresult.structuredContentfor the typed payload and
result.content[0].textfor the markdown summary. - Module imports moved:
from gitlab_ci_mcp.server import mcpstill
works, but tool functions now live undergitlab_ci_mcp.tools.*.