Skip to main content
Glama

snippet_get

Read-only

Retrieve a single saved code snippet by its ID, returning its full source code for review or reuse. Use it to fetch exact PHP, CSS, or JS stored on your WordPress site.

Instructions

Get one snippet by ID, including its full code.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "snippet_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.2

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered by structured data. The description adds one genuinely useful behavioral fact — that the returned record includes the full code body, more than a list view would. It does not say what happens for a nonexistent ID (error vs empty) or whether code is returned raw or syntax-wrapped.

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?

One short sentence with zero filler, and the key scope element ('including its full code') is placed at the end where it reads as the differentiator. Tight and front-loaded; only slightly terse given the remaining gaps.

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

Completeness3/5

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

For a simple single-param read tool with annotations and no output schema, the description covers the essentials. The notable omission is not-found behavior, which matters for a lookup by ID, and no signal on how IDs are obtained.

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 coverage is 0%, so the description must carry the parameter meaning on its own; 'by ID' does establish that the integer parameter is the snippet identifier. That is the minimum needed for a single-param lookup, but it adds no format constraints or hints about where IDs come from.

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 and resource ('Get one snippet by ID') and adds a scope detail ('including its full code') that distinguishes it from snippet_list, which presumably returns partial records. Clear enough that an agent can choose it over the sibling list tool, though it never names 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?

Usage is implied: use when you already have a snippet ID. There is no explicit when-to-use / when-not-to-use guidance, no pointer to snippet_list as the way to discover IDs, and no mention of snippet_revisions as an alternative for history. Adequate but leaves routing to inference.

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