Skip to main content
Glama

sent_split

Split text into sentences with exact character offsets for RAG chunking and citation-grade spans, using spaCy, regex, or Chinese jieba segmentation by language.

Instructions

Sentence segmentation with offsets - the foundation for RAG chunking. Chinese: jieba + rule regex; English: spaCy sents by default, or the zero-dependency regex fallback with engine="regex" - use the fast path for bulk preprocessing where neural segmentation is not worth the CPU time.

Input Schema

NameRequiredDescriptionDefault
langNoauto
textYes
engineNoauto

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: it discloses default engines per language, the zero-dependency fallback, and the CPU trade-off of the regex path. It says nothing about offset units (character vs. byte), behavior on empty/unsupported input, or determinism, though the output schema covers the return shape.

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?

Three short sentences, front-loaded with what the tool does and what it's for, then the engine details. Slightly dense with backtick markup but no filler.

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?

An output schema exists so return values needn't be described, but with no annotations, 0% schema description coverage, and a `lang` param never mentioned, an agent still can't be sure what values `lang` accepts or what the offsets index into. Adequate for a simple text-processing tool, but with clear gaps.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does substantively: it names the legal `engine` value "regex" and explains the default engine differs by language (jieba for Chinese, spaCy sents for English). It never mentions the `lang` parameter, its "auto" default, or accepted values, leaving one of three params unexplained.

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+resource ('Sentence segmentation with offsets') and motivates it ('foundation for RAG chunking'). It implicitly distinguishes itself from word-level siblings like tokenize, but never names an alternative tool, so the differentiation is left to inference.

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?

Gives real guidance on engine choice: spaCy default vs. `engine="regex"` fast path 'for bulk preprocessing where neural segmentation is not worth the CPU time', plus jieba for Chinese. However, it never says when to call sent_split instead of tokenize or annotate_full, which are the closest siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.