Skip to content

Refactor MCP Implementation: Separate Tools, Resources, and Prompts Primitives #218

Open
@ra1han

Description

@ra1han

The current MCP implementation of NLWeb exposes 5 tools and no other primitives. The 5 tools are -

"name": "ask",
"description": "Ask a question and get an answer from the knowledge base",

"name": "ask_nlw",
"description": "Alternative name for the ask function",

"name": "list_prompts",
"description": "List available prompts that can be used with NLWeb",

"name": "get_prompt",
"description": "Get a specific prompt by ID",

"name": "get_sites",
"description": "Get a list of available sites",

Ideas for improvements -

  1. Remove the list_prompts, get_prompt and get_sites from Tools. Tools should represent executable actions, not granular data retrieval or metadata listing.
  2. Introduce Resources primitive and include the sites here. The Client app should be able to select one or multiple sites from Resources and scope the search within those sites. I don't think we should expose the prompts even in Resources.
  3. Introduce Prompts primitive. Here NLWeb should support the CLI commands like -
    • Index a new site
    • Remove an existing site
    • Check index process status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions