Skip to main content
Glama

pdg

Destructive

Cook a TOP network and read its work items: check status, filter states, start or cancel cooks, and mark nodes dirty. Use for TOP networks only.

Instructions

Cook a TOP network, and read what its work items did.

Use it for a TOP network only. A TOP node does not cook like a SOP: it
makes work items, and each item runs on its own. For a SOP or a DOP, use
cook. For a ROP, use render.

mode:
    "status"    — the counts for each state, and whether a cook runs now.
    "workitems" — the items. `state` filters, for example "failed".
    "cook"      — start the cook. The call comes back at once; read
                  "status" after it to follow the work.
    "dirty"     — mark the node dirty. `dirty_all` also removes the
                  outputs on disk.
    "cancel"    — stop the cook that runs now.

Returns JSON. A failed item holds the command and the log path: read those
before you change the network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoOne of "status", "workitems", "cook", "dirty", "cancel".status
pathYesThe TOP network or the TOP node.
stateNoworkitems: keep the items in this state, for example "failed" or "cooked".
dirty_allNodirty: also remove the outputs of the node on disk.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.7.3
    • removedInput schema / properties / dirty_all / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / dirty_all / description
      Added value: +"dirty: also remove the outputs of the node on disk."
    • removedInput schema / properties / dirty_all / title
      Removed value: -"Dirty All"
    • addedInput schema / properties / dirty_all / type
      Added value: +"boolean"
    • removedInput schema / properties / mode / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / mode / description
      Added value: +"One of \"status\", \"workitems\", \"cook\", \"dirty\", \"cancel\"."
    • removedInput schema / properties / mode / title
      Removed value: -"Mode"
    • addedInput schema / properties / mode / type
      Added value: +"string"
    • addedInput schema / properties / path / description
      Added value: +"The TOP network or the TOP node."
    • removedInput schema / properties / path / title
      Removed value: -"Path"
    • removedInput schema / properties / state / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / state / default
      Removed value: -null
    • addedInput schema / properties / state / description
      Added value: +"workitems: keep the items in this state, for example \"failed\" or \"cooked\"."
    • removedInput schema / properties / state / title
      Removed value: -"State"
    • addedInput schema / properties / state / type
      Added value: +"string"
    • removedInput schema / title
      Removed value: -"toolArguments"
  2. Addedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: cook is asynchronous and returns immediately, cancel stops the currently running cook, dirty_all deletes outputs on disk (the concrete destructive action behind destructiveHint=true), and failed items carry a command plus log path. Nothing contradicts the readOnlyHint=false / destructiveHint=true / idempotentHint=false annotations.

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?

Front-loaded with purpose then routing, followed by a clean mode list — every line earns its place. The multi-line indented mode block is slightly heavy for a four-parameter tool, but there is no filler or repeated content.

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

Completeness5/5

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

An output schema exists, so return values need not be spelled out, yet the description still flags the actionable failure detail (command + log path) and warns to read it before mutating the network. All five modes, the async cook lifecycle, and the destructive dirty_all path are covered.

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?

Schema coverage is 100%, so the baseline is 3, but the description goes further by defining the semantics of each mode value and how `state` filters results (e.g. "failed") and what `dirty_all` actually removes. It stops short of documenting the `path` parameter's accepted forms beyond 'TOP network or TOP node'.

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?

States a specific verb+resource pair ('Cook a TOP network, and read what its work items did') and immediately differentiates itself from the sibling tools cook (SOP/DOP) and render (ROP). An agent can pick this over cook/render without opening either schema.

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

Usage Guidelines5/5

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

Explicitly scopes usage ('Use it for a TOP network only') and routes alternatives by node type: cook for SOP/DOP, render for ROP. It also enumerates every mode with a when-to-use condition, including the async cook pattern ('start the cook... read status after it to follow the work').

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