Skip to content

[Feature Request]: Filtering by gateway ID in the List Tools API #1409

@devramcy

Description

@devramcy

🧭 Type of Feature

Please select the most appropriate category:

  • Enhancement to existing functionality
  • New feature or capability
  • New MCP-compliant server
  • New component or integration
  • Developer tooling or test improvement
  • Packaging, automation and deployment (ex: pypi, docker, quay.io, kubernetes, terraform)
  • Other (please describe below)

🧭 Epic

Title: Add gateway-based filtering support in List Tools API
Goal: Enable filtering of tools based on the gateway through which they were registered in Context Forge.
Why now:
When a user registers a new gateway in Context Forge (via /gateway), it internally pulls all tools from the connected remote MCP server. However, the /tools API currently lists all tools across all gateways, without a way to differentiate them.
We want to add support for filtering by gateway_id so that only the tools pulled as part of a specific gateway registration can be listed. This will help in scenarios where tools need to be associated with or added to a specific virtual server.


🙋‍♂️ User Story 1

As a: Developer or platform service
I want to: Retrieve tools that were pulled during a specific gateway registration
So that: I can accurately identify and use tools associated with that gateway only

✅ Acceptance Criteria

Scenario: List tools filtered by gateway ID
  Given a gateway has been registered in Context Forge
  And tools have been pulled from the connected remote MCP server
  When I call the List Tools API with the query parameter `gateway_id=<id>`
  Then the API should return only the tools registered through that gateway
  And tools from other gateways should be excluded

✅ Design sketch

flowchart TD
A[Register Gateway via /gateway API] --> B[Gateway pulls tools from remote MCP server]
B --> C[Tools stored in Context Forge with gateway metadata]
C --> D[List Tools API called with ?gateway_id=]
D --> E[Return only tools linked to specified gateway ID]

✅ Additional Context

Endpoint example:
GET /tools?gateway_id=

This enhancement helps internal workflows like virtual server creation, where only tools associated with a given gateway need to be listed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageIssues / Features awaiting triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions