Skip to main content
Glama
BitingSnakes

silkworm-mcp

by BitingSnakes

find_selectors_by_text

Find the smallest HTML elements matching text and retrieve CSS/XPath selector candidates for targeted scraping.

Instructions

Find CSS/XPath selector candidates for the smallest matching elements by text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlNo
limitNo
match_typeNoexact
source_urlNo
text_charsNo
text_queryYes
case_sensitiveNo
max_size_bytesNo
document_handleNo
truncate_on_limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesNo
match_typeYes
source_urlNo
text_queryYes
total_matchesYes
case_sensitiveYes
document_handleNo
omitted_matchesYes
returned_matchesYes
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions that it finds "smallest matching elements," which hints at an algorithmic behavior, but it does not disclose how the tool obtains HTML (via html, source_url, or document_handle), potential side effects, or performance characteristics. The description is too thin for a tool with 10 parameters.

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 a single, front-loaded sentence with zero wasted words. It is concise and communicates the core purpose efficiently, but given the tool's complexity (10 parameters), it is arguably under-sized. Still, it does not contain redundant information, so it earns a high score, though not a perfect 5.

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

Completeness2/5

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

Despite having an output schema, the description is too brief to be complete for such a complex tool. It does not explain the tool's role among many selector-related siblings, nor does it provide context on input sources, matching behavior, or output structure. The agent is left with many unknowns for invocation.

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

Parameters1/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 compensate, but it only mentions "text" which trivially maps to text_query. There is no explanation of match_type, case_sensitive, limit, truncate_on_limit, or the three mutually exclusive input paths (html, source_url, document_handle). The description adds no meaning beyond what is structurally obvious.

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

Purpose5/5

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

The description uses a specific verb ("Find") with a clear resource ("CSS/XPath selector candidates") and a qualifier ("for the smallest matching elements by text"). This clearly distinguishes it from sibling tools like query_selector or analyze_css_selectors, which serve different purposes.

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 explicit when-to-use guidance or mention of alternatives. The phrase "by text" implies a text-based selection scenario, but it does not state when to choose this tool over query_selector, compare_selectors, or other sibling tools. No exclusions or prerequisites are provided.

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/BitingSnakes/silkworm-mcp'

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