GetLines
MemoryTools
Description
Extract specific lines from stored text data with precision! GetLines lets you retrieve only the relevant parts of a large text - perfect for processing log files, configurations, or lists.
Choose a start and end index to get exactly the range you need. Ideal for paginated output, displaying code snippets, or analyzing specific log entries.
Why This Tool Stands Out
- Targeted Extraction of line ranges
- Log Analysis simplified
- Pagination of text data
- Extract code snippets
Perfect for:
Developers who need to analyze log files, system administrators who want to read configuration files, and anyone who works with large text data and needs only specific sections.
Workflow support; time savings depend on the task
Instead of manually searching through large text files or writing complex scripts, extract exactly the lines you need - instantly and precisely.
JSON Parameters
- key REQUIRED (String)The key of the stored text data. Example: "log_data", "config_text"
- startLine OPTIONAL (Integer)The first line to extract (0-based). Default: 0
- endLine OPTIONAL (Integer)The last line to extract. Default: end of the text
Example Call
{
"tool": "GetLines",
"params": {
"key": "server_log",
"startLine": 100,
"endLine": 150
}
}
Return Values
The tool returns an object with the following properties:
- success (Boolean)
True if the extraction was successful - lines (Array)
The extracted lines as a string array - totalLines (Integer)
Total number of lines in the original - extractedCount (Integer)
Number of extracted lines - error (String, optional)
Error message if the key does not exist
Example Usage
Workflow: Analyze a Log File
Save a log file under a key with Store.
Use GetLines to extract only the lines you need.
Process the extracted lines further or save the result.
Related Tools
SindByte MCP Server
Discover all 239 tools for AI-powered system integration, data processing and automation.
All MemoryTools