list_salvaged_fragments
Retrieve salvaged document fragments from KFabric's corpus, optionally filtered by query, to prepare high-quality indexable artifacts for RAG implementation.
Instructions
List salvaged fragments optionally filtered by query.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kwargs | Yes |
Implementation Reference
- kfabric/mcp/registry.py:166-175 (handler)The handler function that executes the logic to retrieve and return salvaged fragments using the orchestrator.
def _list_salvaged_fragments(orchestrator: Orchestrator, _db: Session, _settings: AppSettings, arguments: dict[str, Any]) -> Any: return [ { "id": fragment.id, "fragment_text": fragment.fragment_text, "fragment_score": fragment.fragment_score, "fragment_type": fragment.fragment_type, } for fragment in orchestrator.list_fragments(arguments.get("query_id")) ] - kfabric/mcp/registry.py:253-262 (registration)The MCP tool registration for 'list_salvaged_fragments' in kfabric/mcp/registry.py.
ToolDefinition( name="list_salvaged_fragments", title="List Salvaged Fragments", description="List salvaged fragments optionally filtered by query.", version="1.0.0", input_schema={"type": "object", "properties": {"query_id": {"type": "string"}}}, output_schema={"type": "array"}, security=common_security, handler=_list_salvaged_fragments, ),