alab_management.mcp_data_reports package#

Module contents#

ALab Data reports MCP — stdio tools wrapping dashboard /api/data/reports.

call_tool(name, arguments)[source]#

Dispatch an MCP tool name to the matching HTTP helper.

Return type:

Any

dashboard_base()[source]#

Return the AlabOS dashboard base URL (no trailing slash).

Return type:

str

delete_data_report(name)[source]#

Delete a non-builtin report from the registry. Also delete user_reports/<slug>.py.

Return type:

dict[str, Any]

get_data_report_rows(name)[source]#

Return the stored snapshot for a report.

Return type:

dict[str, Any]

handle_message(msg)[source]#

Handle one JSON-RPC message; return a response or None for notifications.

Return type:

dict[str, Any] | None

list_data_reports()[source]#

List enabled Data report registry entries (no row payloads).

Return type:

dict[str, Any]

main()[source]#

Run MCP over stdin/stdout (one JSON-RPC object per line).

Return type:

None

refresh_data_report(name, *, start=None, end=None, month=None)[source]#

Re-run the generator and store a snapshot.

Return type:

dict[str, Any]

register_data_report(*, name, title, description='', prompt='', module=None, enabled=True, saved=True, created_by='data_report_mcp')[source]#

Register (upsert) a module-backed report. Write user_reports/<slug>.py first.

Return type:

dict[str, Any]

update_data_report(name, **fields)[source]#

PATCH metadata for an existing report (title, description, enabled, saved, prompt).

Return type:

dict[str, Any]