Skip to main content
Glama

Get Snippet

wp_get_snippet
Read-only

Get a specific code snippet by ID. Returns the full snippet code, type, and status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSnippet ID
site_idNoSite ID to target (optional if you have only one connected site)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, so the safety profile is covered. The description adds the return contents (code, type, status), which is useful given no output schema, but says nothing about error behavior or missing-snippet handling.

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?

Two short sentences, front-loaded with the action and the return payload, with no redundant or filler content.

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?

For a simple two-parameter read tool with annotations covering safety and no output schema, the description tells the agent what it fetches and roughly what comes back. Minor gaps remain around not-found behavior and the optional site_id, but nothing critical is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so both 'id' and 'site_id' are already documented in the schema. The description only echoes 'by ID' and adds no syntax or format detail beyond the structured field, so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb ('Get') plus resource ('code snippet') and the lookup key ('by ID'), and names what is returned (code, type, status). It is clearly distinct from wp_list_snippets, though it does not name that sibling explicitly.

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?

'by ID' implies the tool is for when the identifier is already known, which implicitly routes users to wp_list_snippets for discovery, but no when/when-not guidance or alternative is stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources