Skip to main content
Glama

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
NameRequiredDescriptionDefault
kwargsYes

Implementation Reference

  • 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"))
        ]
  • 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,
    ),

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/fbailleux2/kfabric'

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