Skip to content

[Feature Request] Namespace-based Tool Parameter Overrides (Default Inputs) #247

@PawsFunctions

Description

@PawsFunctions

I am using rust-mcp-server, and in my setup I have a registry hosted locally. However, cargo info only works with crates.io, and it fails in the current setup because the LLM doesn’t add this parameter. If I were able to change it somewhere in the middle, it would help fix the issue.

I have requested this feature on the Rust MCP repo:
Vaiz/rust-mcp-server#82


Disclaimer : AI content Starts here:

Description

Currently, MetaMCP allows for great orchestration of multiple MCP servers through Namespaces. However, when a tool is exposed through a namespace, it always requires the full set of arguments defined by the upstream server.

I would like to propose a system that allows users to set default values for specific tool inputs at the Namespace level.

The Problem

In many cases, an MCP tool has parameters that stay the same for a specific project or workflow. For example:

  • A filesystem tool might always need to point to a specific /project/docs directory for one namespace, but a /logs directory for another.
  • A search tool might always need a specific site:example.com filter or a specific region set for a particular team's namespace.

Right now, the LLM/User has to provide these values every single time, which increases token usage and the chance of errors.

Proposed Solution

Add a configuration option within the Namespace settings (either in the UI or the provision.yaml) to "bind" or "override" tool parameters.

Key features of this proposal:

  1. Namespace-Level Defaults: Allow users to define a JSON object of default values for a specific tool within a namespace.
  2. Input Masking: If a default is set, provide an option to "hide" that parameter from the LLM, effectively turning it into a constant for that specific endpoint.
  3. Variable Injection: (Optional) Support environment variables (e.g., ${USER_ID}) in these default settings.

Example Configuration (Conceptual)

In the Namespace settings, it could look like this:

{
  "namespace": "documentation-helper",
  "servers": [
    {
      "name": "local-files",
      "tool_overrides": {
        "read_file": {
          "defaults": {
            "base_path": "/home/user/docs/project-v1"
          },
          "hidden_params": ["base_path"]
        }
      }
    }
  ]
}

Why this is useful

  • Security: You can restrict a tool to only work on a specific folder or resource by hardcoding the input.
  • Efficiency: Reduces the amount of context/instructions needed for the LLM.
  • Personalization: Allows different "Namespaces" to act as specialized agents with pre-configured settings.

Thank you for the amazing work on MetaMCP! I believe this would significantly improve the developer experience for complex agentic workflows.


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