Skip to main content
Glama

delete_range

Remove characters from text by specifying exact start and end positions to delete text segments with character-level precision.

Instructions

Delete characters in range [start, end).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
startYes
endYes

Implementation Reference

  • The handler function implementing the 'delete_range' tool logic. It deletes the characters in the specified range [start, end) from the input text using Python string slicing and concatenation. The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool() def delete_range( text: Annotated[str, "Original text"], start: Annotated[int, "Starting index (inclusive)"], end: Annotated[int, "Ending index (exclusive)"] ) -> str: """Delete characters in range [start, end).""" return text[:start] + text[end:]

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/agent-hanju/char-index-mcp'

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