search_segment
Find relevant document segments using TF-IDF search, returning highlighted snippets with context around matched terms to locate specific information within large documents.
Instructions
Search for relevant segments using TF-IDF.
Returns snippets with matched terms highlighted.
Args: query: Search query (keywords or phrases). document_id: Optional: limit search to a specific document. segment_id: Optional: search within a specific segment only. limit: Maximum number of results to return (default: 5). context_words: Number of words around matches in snippets (default: 50).
Returns: Search results with scores and snippets.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_segment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| document_id | No | ||
| segment_id | No | ||
| limit | No | ||
| context_words | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||