Skip to main content
Glama

Create Standard Operating Procedure

create_sop

Create a new Standard Operating Procedure by submitting body content: it assigns an ID, derives a filename from the H1 title, validates the content, and writes the markdown document.

Instructions

Create a new Standard Operating Procedure: assigns a fresh id, derives a filename from the body's H1 title, validates the submitted body-only content, and writes the new document to the SOP base directory. A content-validation failure of the submitted body returns a non-raising ValidateResult (valid=False, a single errors[].message capped at 300 chars as the generic validate tool caps it, feat-110) instead of raising AssertionError/pydantic.ValidationError (ADR f14f125e-eaad-4f4f-a6fd-3c931bed726e, GitHub issue #204 -- case 5 of the ADR 519d1206 non-raising-structured-result workaround chain); nothing is written in that case. Returns the newly created document's frontmatter only (no body); use the corresponding get_sop tool to fetch the full document afterward.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the side effects (id assignment, filename derivation, write to the SOP base directory), the exact failure mode (non-raising `ValidateResult` with `valid=False` and a 300-char-capped error message, no write performed), and the return shape (frontmatter only, no body). This is behaviorally rich for a mutation tool.

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

Conciseness3/5

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

The purpose and outcome are front-loaded, but the middle is cluttered with internal identifiers (ADR UUIDs, issue #204, 'case 5 of the ADR... workaround chain', feat-110) that add no decision value for an agent and dilute the actionable content. Several sentences do not fully earn their place.

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

Completeness4/5

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

The tool's behavior, failure path, and return contract are all covered, so an agent has enough to invoke it correctly. Because an output schema already exists, the sentence describing the frontmatter-only return is somewhat redundant, but the coverage is otherwise complete.

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 0% and the single `content` param is undocumented in the schema, but the description compensates: it specifies the argument is body-only content (no frontmatter) and that its H1 title drives the generated filename. That is meaningful added semantics beyond the bare `string` type.

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?

Opens with a specific verb+resource ('Create a new Standard Operating Procedure') and enumerates the concrete lifecycle steps: id assignment, filename derivation from the H1 title, body validation, and write. It also explicitly names `get_sop` as the complementary tool, so an agent can separate it from the sibling `create_*`/`parse_sop` tools without opening schemas.

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 gives a clear follow-up step ('use the corresponding `get_sop` tool to fetch the full document afterward') but never states when to choose `create_sop` over alternatives such as `parse_sop`, `edit`, or `update_frontmatter`, nor any prerequisites for calling it. Usage is implied rather than spelled out.

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