feat: add MCP run status query tools
This commit is contained in:
@@ -15,6 +15,9 @@ from summary_mcp.models.filtering import FilterContext, FilterInput
|
||||
from summary_mcp.models.item import Item
|
||||
from summary_mcp.models.llm_result import LlmSummaryResult
|
||||
from summary_mcp.models.summary_io import ExtractionInput
|
||||
from summary_mcp.runtime import get_run_status as load_run_status
|
||||
from summary_mcp.runtime import list_run_artifacts as load_run_artifacts
|
||||
from summary_mcp.runtime import list_runs as load_runs
|
||||
from summary_mcp.workflows import run_freshrss_pipeline
|
||||
from summary_mcp.workflows.article_summary import ArticleSummaryConfig, summarize_selected_articles
|
||||
|
||||
@@ -119,6 +122,28 @@ def run_freshrss_openclaw_pipeline(
|
||||
return result
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def get_run_status(run_id: str) -> dict:
|
||||
"""Get the current status of a workflow run by run_id."""
|
||||
return load_run_status(run_id=run_id)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def list_runs(
|
||||
workflow: str | None = None,
|
||||
status: str | None = None,
|
||||
latest_n: int = 20,
|
||||
) -> dict:
|
||||
"""List recent workflow runs with optional workflow/status filters."""
|
||||
return load_runs(workflow=workflow, status=status, latest_n=latest_n)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def list_run_artifacts(run_id: str) -> dict:
|
||||
"""List registered and discovered artifacts for a workflow run."""
|
||||
return load_run_artifacts(run_id=run_id)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def generate_article_summaries(
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user