Skip to main content
Glama

Preview literal replacements

bpj_replace_literal
Read-onlyIdempotent

Replace all non-overlapping occurrences of a literal string and report the count.

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": {
      "text": "<text>",
      "find": "<find>",
      "replacement": "<replacement>"
    },
    "name": "bpj_replace_literal"
  }
}

Input Schema

NameRequiredDescriptionDefault
findYes
textYes
replacementYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already establish readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. Beyond that the description adds two genuinely useful traits — 'non-overlapping' (no re-scan of inserted text) and count reporting — but omits case-sensitivity behavior and does not say whether the rewritten string is part of the response, which matters for a preview-style 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?

A single sentence with zero filler, front-loading the matching semantics before the reported side effect. Nothing could be removed without losing information.

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 three-string read-only tool with no output schema, the description covers the core operation but leaves the return shape implicit (count only, or replaced text plus count) and omits case sensitivity. These are the two details an agent would most need before relying on the result.

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 0%, so the description carries the burden; it does add real meaning by calling 'find' a literal string (i.e., not a regex, not a glob) and by defining replacement scope as all non-overlapping matches. However, it says nothing about 'text' input expectations (encoded in only as a 12000 maxLength) or about how 'replacement' handles special characters like backreferences or $.

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?

The description names a concrete verb and resource ('replace all non-overlapping occurrences of a literal string') and states that it reports a count, so the operation is identifiable. It never resolves the tension with its own title 'Preview literal replacements' — whether the transformed text is returned or only a count — which leaves a small but real ambiguity about the tool's product.

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 only implied: an agent can infer this is for straightforward literal substitution. There is no statement of when to prefer it over regex-style or structured transforms among the many bpj_* utilities, and no exclusions or prerequisites are given.

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.