string_substring
string_substringExtract specific portions of text by defining start and end positions to isolate needed content segments.
Instructions
Extract a substring
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| start | No | ||
| end | No |
string_substringExtract specific portions of text by defining start and end positions to isolate needed content segments.
Extract a substring
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| start | No | ||
| end | No |
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Extract a substring' implies a read-only operation that returns a portion of text, but it doesn't specify how indices work (e.g., zero-based vs. one-based, negative indices for counting from the end), error handling for out-of-bounds indices, or what happens if 'start' or 'end' are omitted. This leaves significant behavioral gaps for a tool with 3 parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at two words, front-loading the core action ('extract') and target ('substring') with zero waste. Every word earns its place by directly conveying the tool's function without unnecessary elaboration, making it easy to scan and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain how substring extraction works with the parameters, what the output looks like, or error conditions. For a tool that manipulates text based on indices, more context is needed to use it effectively without trial and error.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 by explaining parameters. 'Extract a substring' implies parameters for the text and extraction bounds, but it doesn't clarify the roles of 'start' and 'end' (e.g., whether they are indices, inclusive/exclusive). Without this, users might misinterpret the schema's integer parameters. The description adds minimal value beyond the schema's basic types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Extract a substring' clearly states the verb ('extract') and resource ('substring'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'string_join' or 'string_replace' by focusing on extraction rather than combination or replacement. However, it doesn't specify what kind of substring extraction (e.g., by indices) beyond the basic concept.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. With siblings like 'regex_extract' and 'string_split' that also extract portions of text, there's no indication of when substring extraction by indices is preferable over pattern-based or delimiter-based extraction. No context or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaobenyang-com/Text-Toolkit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server