In MCP clients that support rendered tool output, mage-agent returns compact
resource widgets for supported resource actions. Widgets are currently
available for pipelines, blocks, pipeline runs, block runs, block outputs,
pipeline schedules, and pipeline triggers. They do not change the tool
arguments or authentication flow; clients that do not support rendered output
still receive the normal structured tool response.
Resource Widget Contract
The widget path is an additive MCP Apps enhancement for read-only resource tools. A widget-enabled tool descriptor includes both_meta.ui.resourceUri and
_meta["openai/outputTemplate"] pointing at the registered HTML resource. When
the tool succeeds, mage-agent returns:
structuredContent.kind = "mage_resource_widget"structuredContent.schema_versionfor renderer compatibilitystructuredContent.resourceandstructuredContent.actionstructuredContent.stateasok,empty,loading, orerror- sanitized
records,summary,columns,filters, andpagination - optional sanitized
mutationmetadata for create, update, or delete results - optional sanitized
graphdata for pipeline-oriented detail widgets, using normalizednodesandedgesinstead of raw pipeline YAML content[0].textas a JSON fallback for clients that do not render widgets_meta["openai/widgetData"]with widget-only rendering hints
Operation: Create; delete results without a returned record render a compact
success state. The adapter must redact sensitive fields before they enter
structuredContent, fallback content, widget _meta, or activity logs.
Pipeline-oriented widgets may include a compact graph preview when Mage returns
block dependency metadata. The graph shape is:
Adding Widget Support
To add another Mage resource widget:- Add the resource/action pair to
widget_contracts.py. - Add presentation columns, summary fields, empty/error copy, and guidance in
widget_registry.py. - Add adapter tests that cover populated, empty, malformed, large-result, and secret-bearing payloads.
- Add renderer coverage in
widgets/resource_widgetand the app-shell preview route under/apps/test/resource-widgets. - Run the MCP protocol tests and an EKS mocked app-shell visual check before calling the change QA-ready.
pipeline_schedules. Use
pipeline_triggers only when the user explicitly asks for the advanced
PipelineTriggerResource config surface scoped to a pipeline.
Codex chat context
current_page_context
current_page_context
Read the visible non-chat text that Mage Pro AI Chat captured from the user’s current browser page for the active chat turn.This tool is only registered when Mage Pro AI Chat starts Codex with captured page context. Standard IDE MCP sessions do not expose it unless
MAGE_AGENT_CURRENT_PAGE_CONTEXT_PATH points to a valid context sidecar file.The context is scoped to the authenticated user and chat session, excludes the Codex chat UI, and should only be used for page-relative requests such as “explain this page” or “what am I looking at?”
Pipelines
pipeline_list
pipeline_list
List all pipelines in the project.Arguments: noneExample prompt: “List all my Mage pipelines”
pipeline_get
pipeline_get
Get details for a single pipeline.
pipeline_create
pipeline_create
Create a new pipeline.
Example prompt: “Create a new streaming pipeline called
realtime_events”pipeline_update
pipeline_update
Update fields on an existing pipeline.
pipeline_delete
pipeline_delete
Delete a pipeline by UUID.
Blocks
block_list
block_list
List all blocks in a pipeline.
block_get
block_get
Get block details including source code.
block_create
block_create
Create a new block in a pipeline.Example prompt: “Add a SQL transformer block to the
Supported block types:
data_loader, transformer, data_exporter, sensor, callback, chart, conditional, custom, dbt, extension, global_data_product, markdown, scratchpadIf no
config is provided, mage-agent automatically matches a block template for you. For integration pipelines, it also auto-detects available sources and destinations.customer_etl pipeline that filters rows where revenue > 1000”block_update
block_update
Update a block’s code or configuration.
block_templates_list
block_templates_list
List available block templates.
Templates are cached for 24 hours at
~/.mage-agent/cache/block_templates.json.Runs & Logs
run_pipeline
run_pipeline
Trigger a pipeline run.
Example prompt: “Run the
daily_refresh pipeline”run_logs
run_logs
Fetch logs for a specific pipeline run.
Example prompt: “Show me the logs for the last run”
Sync
sync_project_to_local
sync_project_to_local
Pull all remote project files to a local directory.
sync_status
sync_status
Show what has changed between local and remote.
sync_local_to_remote
sync_local_to_remote
Push locally changed files to the cluster.
Mage Cloud Backend
Mage Cloud Backend tools are exposed only for installed-agent sessions that have Cloud handoff credentials. These tools are generated from the Cloud Backend resource inventory, so callmage_tool_contract before invoking a Cloud tool
when payload or query shape matters.
Cloud Backend contracts
Cloud Backend contracts
Cloud Backend create and update requests use the same resource-root envelope
that the backend API expects. Do not send flat mutation payloads.
Role fields use Cloud Backend integer values: owner
0, admin 1,
editor 2, viewer 3.For example, creating a team invitation uses:cluster_stats requires query.cluster_uuid; cluster_uuid is not a path
identifier for that tool.cloud_users supports list, get, and update. It does not expose
create, because Cloud Backend treats users.create as the public signup
path rather than a private team-admin user creation API.