Skip to main content

MCP server exposing the Galaxy tool refactoring facade to AI agents.

Project description

galaxy-tool-refactor-mcp

An MCP server that exposes the Galaxy tool refactoring framework to AI coding agents. A tier-4 sibling of galaxy-tool-refactor-cli: both wrap the galaxy-tool-refactor-registry facade (tier 3.6) for a different audience — the CLI for humans at a terminal, this for agents over the Model Context Protocol.

Shape

The facade is library-first (structured args in, structured results out, no disk writes unless asked, introspectable), so the server is a thin adapter:

  • service.py — protocol-agnostic. Pure functions that take XML as a str (plus rulesets / select / ignore) and return JSON-able dicts by calling the facade. No mcp import; fully unit-tested.
  • server.py — the FastMCP binding. A small handler per tool delegates to service, and is the error boundary (facade UnknownRuleset / UnknownRuleCode / UnknownProfile and tier-1 ToolXmlSyntaxError → a clean MCP tool error).

Tools

MCP tool What it does
format_tool Apply a ruleset's fixable rules then format; returns canonical XML + advisory notes.
upgrade_tool Repair then profile placement then format; minimal-bump by default (profile= moves only when strictly needed for validity; modernize opts into the behavior-preserving walk, capped at the lower of the behaviour ceiling and the deployment ceiling, the newest profile every major public Galaxy server runs; allow_behavior_change lifts the walk's behaviour gate only, target_profile caps the walk and may exceed the deployment ceiling); returns upgraded XML, steps applied, the behavior-preserving verdict, baseline_profile/reached_profile/stopped_at/blocking_codes/auto_fixed_codes, and notes.
check_tool Report-only detect over the selected rules; returns the findings (each flagged fixable vs advisory).
convert_help_tool Convert an RST <help> body to Markdown when provable (profile ≥ 24.2 + render-equivalence gate); returns converted XML or a skip reason.
tokenize_version_tool Factor a literal version="<base>+galaxy<suffix>" into @TOOL_VERSION@/@VERSION_SUFFIX@ tokens when the expansion-equality gate proves it byte-identical; returns tokenized XML or a skip reason.
list_rulesets The baked-in rulesets (name / codes / is_default / description).
list_rules The baked-in rules (code / summary / family / fixable / rulesets).

Agents supply content and receive content — the server never writes to disk.

Run

uv run galaxy-tool-refactor-mcp   # serves over stdio

Point an MCP client (e.g. a coding agent) at that command. list_rulesets / list_rules let the agent discover the available rulesets and rule codes at runtime instead of hardcoding them.

See docs/decisions.md D1 for the design, and docs/vision.md for the longer-horizon agent-authored-rules direction (Goal 2, still future).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

galaxy_tool_refactor_mcp-0.3.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

galaxy_tool_refactor_mcp-0.3.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file galaxy_tool_refactor_mcp-0.3.0.tar.gz.

File metadata

  • Download URL: galaxy_tool_refactor_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for galaxy_tool_refactor_mcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b3b3762099c81e0feede0b102ce1dc9a6c8e11380d880d4ccdaccd71bd3ddfbc
MD5 163a5feabed820448cfb1f7a88b7999f
BLAKE2b-256 2783f61e7fe14f07cee9cdee9e6a4c5713735736ec1faa08160f6be8e9e32945

See more details on using hashes here.

Provenance

The following attestation bundles were made for galaxy_tool_refactor_mcp-0.3.0.tar.gz:

Publisher: release.yml on richard-burhans/galaxy-tool-refactor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file galaxy_tool_refactor_mcp-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for galaxy_tool_refactor_mcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28c5c030a9e8b87af0300de615df5c42cb14c071fadb68d1bc2ff4e06a019be7
MD5 ed460bb2721f9bd91d6c41f3792070f8
BLAKE2b-256 a1b829f56ef7e858753d3766890efe0e9d2e9b3f36dbf82f123678da4f9a9eba

See more details on using hashes here.

Provenance

The following attestation bundles were made for galaxy_tool_refactor_mcp-0.3.0-py3-none-any.whl:

Publisher: release.yml on richard-burhans/galaxy-tool-refactor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page