Skip to main content
Glama

request_revision

Send a chapter back to the writer with revision notes to request changes within the multi-agent book-writing pipeline.

Instructions

Send chapter back to writer with notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chapter_numYes
notesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core handler for request_revision tool. Loads project, finds chapter, records revision note in continuity and persistence queue, resets chapter status to DRAFT, clears third_pass_completed and editor_verdict, then saves project.
    def request_revision(chapter_num: int, notes: str) -> str:
        proj, cont = require_project()
        chapter = proj.get_chapter(chapter_num)
        if not chapter:
            return "Chapter not found."
        cont.add_revision_note(chapter_num, "editor", notes)
        append_revision(proj.base_path, chapter_num, notes, agent="editor")
        chapter.status = ChapterStatus.DRAFT
        chapter.third_pass_completed = []
        chapter.editor_verdict = None
        save_project_and_continuity()
        return (
            f"Revision requested — status DRAFT. Notes recorded in continuity and "
            f"`briefs/revision_queue.json`.\n\nNext: run_writer_agent({chapter_num})"
        )
  • FastMCP tool registration of 'request_revision' — decorator @mcp.tool() on async function that delegates to workflow.request_revision.
    @mcp.tool()
    async def request_revision(chapter_num: int, notes: str) -> str:
        """Send chapter back to writer with notes."""
        try:
            return workflow.request_revision(chapter_num, notes)
        except ValueError as e:
            return str(e)
  • Helper that appends a revision entry (chapter, notes, agent, timestamp) to the revision_queue.json file on disk.
    def append_revision(base_path: Path, chapter_num: int, notes: str, agent: str = "editor") -> None:
        entries = load_queue(base_path)
        entries.append(
            {
                "chapter": chapter_num,
                "notes": notes,
                "agent": agent,
                "timestamp": datetime.now().isoformat(timespec="seconds"),
            }
        )
        save_queue(base_path, entries)
  • RevisionNote dataclass: chapter, agent, notes, timestamp — schema for continuity log entries.
    class RevisionNote:
        chapter: int
        agent: str
        notes: str
        timestamp: str = field(default_factory=lambda: datetime.now().isoformat())
  • ContinuityLog.add_revision_note — appends a RevisionNote to the in-memory continuity log.
    def add_revision_note(self, chapter: int, agent: str, notes: str) -> None:
        self.revision_notes.append(RevisionNote(chapter=chapter, agent=agent, notes=notes))
Behavior2/5

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

With no annotations and a minimal description, the tool provides no details on behavioral traits like whether the chapter is blocked pending revision, if the action is reversible, or what state changes occur. The description merely states the action without context.

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, well-structured sentence that wastes no words. However, it is excessively terse, lacking important context that could be included without significantly increasing length.

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 presence of sibling tools suggesting a pipeline, the description fails to mention that a chapter must exist and be in a state that allows revision. It also does not reference the output schema (which exists), leaving the agent without expected return value information.

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

Parameters2/5

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

Schema description coverage is 0%, and the description adds no meaning to the parameters. Parameter names 'chapter_num' and 'notes' are self-explanatory, but the description does not clarify expected formats (e.g., what constitutes valid notes) or constraints (e.g., chapter_num range).

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

Purpose5/5

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

The description 'Send chapter back to writer with notes' clearly states the action (send back), the resource (chapter), the target (writer), and the content (notes). It effectively distinguishes from sibling tools like 'approve_chapter' (which approves) and 'add_chapter' (which creates).

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as 'approve_chapter' or 'run_editor_review'. There is no mention of prerequisites (e.g., chapter must exist) or exclusions, leaving the agent to infer usage from the tool name and context.

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