Skip to main content
Glama

text_around

Retrieve cleaned text surrounding an element reference or text match. Returns before, match, and after context blocks for analysis.

Instructions

Return cleaned surrounding text around an element ref or the best ranked text match. Returns {ref, before, match, after, text}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_charsNoCharacters before/after the target (default 400)
refNoOptional element ref like e:142
selectorNoOptional CSS selector to scope context
textNoOptional text to locate when ref is omitted
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not explain what 'cleaned' means, behavior on multiple matches, or side effects. Minimal disclosure of behavior beyond the basic output.

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?

The description is very concise, consisting of one sentence plus the return shape. It is front-loaded with purpose. However, it could benefit from slightly more detail on usage without becoming verbose.

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?

The description explains the return value adequately given no output schema. However, it lacks context on error scenarios, performance, or how it interacts with other tools. Complex enough to warrant a bit more detail.

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%, and the description does not add significant additional meaning beyond the parameter descriptions. It gives a helpful example for 'ref' and default for 'context_chars', but overall baseline 3 is appropriate.

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 clearly states it returns cleaned surrounding text based on an element ref or text match, and lists the return shape. It is specific but does not explicitly differentiate from sibling tools like 'find_text' or 'text_clean'.

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?

No guidance on when to use this tool versus alternatives. It does not mention when it is appropriate to use ref vs text, or what to do when both are omitted. No context on when not to use it.

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/protostatis/unbrowser'

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