Skip to main content
Glama

Find terms in context

bpj_search_text_context
Read-onlyIdempotent

Find literal matches and return UTF-16 offsets with neighboring text.

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>",
      "term": "<term>",
      "radius": "<radius>"
    },
    "name": "bpj_search_text_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
termYes
textYes
radiusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description does add real behavior beyond them by disclosing the return shape: UTF-16 offsets rather than bytes or codepoints, plus neighboring text. It omits case sensitivity, match ordering, overlapping-match behavior, and whether all matches are returned.

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?

One sentence with zero filler, front-loading the action and the return format. Nothing is repeated from the schema or annotations.

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 three-parameter text search with no output schema, the description covers both the matching semantics and the return payload, which is most of what an agent needs. The remaining gaps are offset base (0- vs 1-indexed), case sensitivity, and radius units, which matter but do not block correct invocation.

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 must carry the meaning of term, text, and radius. It clarifies that the term is a literal match (not a pattern) and that radius produces neighboring text, which is genuine added meaning. However, it never states whether radius is measured in UTF-16 code units or characters, nor that the term is case-sensitive by default, leaving real ambiguity in a 3-required-parameter tool.

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-plus-resource: find literal matches in text and return UTF-16 offsets plus surrounding context. That is concrete enough to picture the output. It never contrasts itself with nearby siblings such as bpj_find_invisible_characters or bpj_count_word_frequency, so differentiation is left to the name.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no named alternative. The word 'literal' implicitly signals non-regex matching, but the agent gets no help deciding between this and a frequency-count or inspect tool.

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.