Skip to main content
Glama

Decompose Context

rlm_decompose_context
Read-onlyIdempotent

Break long context into chunks using strategies like fixed size, lines, paragraphs, sections, regex, or sentences, allowing processing of arbitrarily long text without external APIs.

Instructions

Split context into chunks using various strategies.

Strategies:

  • fixed_size: Fixed character chunks with overlap

  • by_lines: Chunk by number of lines

  • by_paragraphs: Split on double newlines

  • by_sections: Split on markdown headers

  • by_regex: Split on custom pattern

  • by_sentences: Split into sentences

Returns chunk metadata (indices, offsets). Use rlm_get_chunks to retrieve content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
overlapNoOverlap between chunks
patternNoRegex pattern (for by_regex strategy)
strategyNoDecomposition strategyfixed_size
chunk_sizeNoChunk size in characters (for fixed_size strategy)
context_idNoContext identifiermain
session_idNoSession ID
return_contentNoInclude chunk content in response (can be large)
lines_per_chunkNoLines per chunk (for by_lines strategy)
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds meaningful context by stating that the tool returns chunk metadata (indices, offsets) and optionally content which 'can be large,' and by pointing to rlm_get_chunks for content retrieval. This goes beyond the structured annotations without contradicting them.

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?

The description is concise and well-structured: a one-sentence purpose, a bulleted list of strategies, and a brief return/usage note. Every sentence earns its place with no redundancy or fluff, making it easy to parse quickly.

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?

Given the tool has 8 parameters, no output schema, and rich annotations, the description adequately covers the core aspects: strategy options, return format (metadata), and the companion tool for content retrieval. It does not explain default behaviors or parameter interactions, but the schema provides defaults. The pointer to rlm_get_chunks adds important workflow context that improves completeness.

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 has 100% description coverage, so the baseline is 3. The description adds value by providing a strategy legend that explains each enum value in plain terms (e.g., 'by_paragraphs: Split on double newlines', 'by_sections: Split on markdown headers'). This helps the agent understand the intended use of the strategy parameter beyond the schema's concise descriptions.

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 clearly states the tool's purpose: 'Split context into chunks using various strategies.' It uses a specific verb and resource, and distinguishes itself from sibling rlm_get_chunks by stating that this tool returns chunk metadata while rlm_get_chunks is used to retrieve content. This is a clear, non-generic purpose statement.

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

Usage Guidelines4/5

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

The description provides useful usage context by listing all strategies and explicitly pointing to rlm_get_chunks for retrieving chunk content, implying a decomposition-then-retrieval workflow. However, it does not explicitly state when not to use this tool or compare it with other siblings like rlm_read_context or rlm_search_context, so it falls short of full alternative guidance.

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/win10ogod/RLM-MCP'

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