Skip to main content
Glama

get_pipeline_status

Retrieve the current status of the book chapter pipeline to determine which guarded step (writer, editor, third-pass, or approve) should execute next.

Instructions

Next MCP tool to call per chapter (guarded pipeline hints).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • ChapterStatus enum defining the pipeline states (NOT_STARTED, DRAFT, AWAITING_EDITOR, AWAITING_THIRD_PASS, APPROVED) used by get_pipeline_status to determine next steps.
    class ChapterStatus(str, Enum):
        NOT_STARTED = "not_started"
        DRAFT = "draft"
        AWAITING_EDITOR = "awaiting_editor"
        AWAITING_THIRD_PASS = "awaiting_third_pass"
        APPROVED = "approved"
  • Core handler logic for get_pipeline_status: iterates over all chapters and determines the next suggested MCP tool call based on each chapter's status. Delegates to ChapterStatus enum for state transitions.
    def get_pipeline_status() -> str:
        """Human-readable next-step hints for every chapter + global checks."""
        proj, _ = require_project()
        env = check_environment()
        lines = [env, "\n## Pipeline\n\n"]
        if not proj.chapters:
            lines.append("No chapters — use **add_chapter**.\n")
            return "".join(lines)
    
        for ch in sorted(proj.chapters, key=lambda c: c.num):
            st = ch.status
            if st == ChapterStatus.NOT_STARTED:
                nxt = f"`start_chapter({ch.num})`"
            elif st == ChapterStatus.DRAFT:
                nxt = f"`run_writer_agent({ch.num})`"
            elif st == ChapterStatus.AWAITING_EDITOR:
                nxt = f"`run_editor_review({ch.num})`"
            elif st == ChapterStatus.AWAITING_THIRD_PASS:
                missing = [a for a in proj.third_agents if a not in ch.third_pass_completed]
                if not proj.third_agents:
                    nxt = f"`approve_chapter({ch.num})`"
                elif missing:
                    nxt = f"`run_third_agent({ch.num}, agent_type=\"{missing[0]}\")` then others: {missing}"
                else:
                    nxt = f"`approve_chapter({ch.num})`"
            else:
                nxt = "done"
            lines.append(f"- **Ch.{ch.num}** ({ch.status.value}) → {nxt}\n")
        return "".join(lines)
  • MCP tool registration via @mcp.tool() decorator. The async function delegates to workflow.get_pipeline_status() with a ValueError catch.
    @mcp.tool()
    async def get_pipeline_status() -> str:
        """Next MCP tool to call per chapter (guarded pipeline hints)."""
        try:
            return workflow.get_pipeline_status()
        except ValueError as e:
            return str(e)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as read-only, side effects, or auth needs. 'Guarded' hints at some constraint but is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, concise and front-loaded, but it sacrifices clarity for brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of sibling pipeline tools and the presence of an output schema, the description lacks detail on return values, pipeline context, and how it differs from tools like get_chapter_status.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the description does not need to add parameter info. Baseline 4 applies as schema coverage is trivial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool is the 'next MCP tool to call per chapter' and provides 'guarded pipeline hints', indicating a role in a sequence but not explicitly stating what it does (e.g., retrieve status). The phrase 'guarded pipeline hints' is ambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage per chapter and as a next step in a pipeline, but lacks explicit when-to-use or when-not-to-use guidance. No alternatives are mentioned among many sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BurgersJackson/storywright-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server