Skip to main content
Glama

publish_sop

Publish new or updated Standard Operating Procedure (SOP) documents. Enforces lint rules so errors block publication, and auto-increments versions.

Instructions

Publish a new or updated Standard Operating Procedure document.

The content parameter MUST contain the complete SOP markdown string with YAML frontmatter declaring:

  • name (required, snake_case, ≥3 underscore segments — the SOP's identity)

  • owner (required, non-empty string — team, alias, or email. This is the point of contact surfaced when feedback is submitted or a mismatch is detected during review. Pick a name you want pinged.)

  • stage (required, 'preprod' or 'prod' — informational lifecycle label; see the stage argument below for mismatch behaviour)

  • version (required, positive integer — advisory revision counter. The tool auto-bumps on each publish (+1), but we ask authors to declare it explicitly so a mismatch between the file on disk and what the author thinks they are updating is visible in the response)

  • description (optional — when omitted, the SOP's ## Overview section is used for short summaries)

Version & stage mismatch: the tool never trusts the frontmatter values blindly. The stage argument wins over the frontmatter stage, and the version is computed server-side (max existing + 1). Both values are overwritten in the stored content so the file on disk always reflects what actually happened. If you pass a version or stage that disagrees with the final stored values, the response surfaces the difference under warning so you can decide whether you were editing the right version.

Example call: {"content": "---\nname: my_sop_name\nversion: 1\nowner: my-team\nstage: preprod\n---\n\n# My SOP\n\n## Overview\nOverview text.\n\n### Step 1: First step\nDo the thing."}

Versioning: plain positive integers — 1, 2, 3, 4, … New SOPs start at 1; each subsequent publish increments by one. No semver.

Lint enforcement: every publish runs the same rule engine as the standalone sop-lint CLI. Errors (SOP rules at severity=error) BLOCK the publish — the tool raises and nothing is written. Warnings are returned under the warning field but do not block. Iterate locally with sop-lint <file> before calling publish_sop to avoid MCP round-trip latency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stageYesDeployment stage: 'preprod' or 'prod'
contentYesComplete SOP markdown with YAML frontmatter (name, owner, stage, version)
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It thoroughly discloses server-side version computation, stage argument precedence, content overwriting, lint errors blocking publish, and warning field behavior. This is exceptional transparency 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.

Conciseness5/5

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

The description is front-loaded with a one-sentence purpose, then uses bold-labeled sections to organize complex details. Every sentence earns its place, including the example and lint guidance. Despite length, it is well-structured and not padded.

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?

Given that there is no output schema and no annotations, the description covers all critical aspects: required input format, versioning and stage precedence, error/warning behavior, and local linting workflow. It is practically complete for correct invocation and outcome understanding.

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

Parameters5/5

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

The schema descriptions are minimal, but the description adds extensive semantics: required YAML frontmatter fields with types and rules, versioning behavior, stage mismatch handling, and a concrete example call. This far exceeds the schema's surface-level descriptions.

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 first sentence clearly states the action ('Publish') and the resource ('a new or updated Standard Operating Procedure document'). It distinguishes from sibling tools like submit_sop_feedback and read_resource, making the tool's role unambiguous.

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

Usage Guidelines4/5

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

The description gives clear context: prepare content with required frontmatter and iterate with sop-lint locally before calling to avoid latency. However, it does not explicitly compare with sibling alternatives or state when not to use this tool, so it lacks explicit exclusions.

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/ValueArchitectsAI/sop-mcp'

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