.NET SDK: MCP server config has no way to set per-server tool deferral (deferTools)

Offen
#2,913 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
65/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
csharp
Bereich
api

Rechercherichtung

Start by locating the .NET definitions of McpServerConfig, McpHttpServerConfig and McpStdioServerConfig, then check how their settings are serialized and tested. Compare the SDK's existing configuration patterns with the stated protocol values, auto and never. Done means each MCP server config can express deferTools and tests verify the setting is carried through.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

With tool search enabled, a session defers every MCP server's tools behind the tool-search tool. The runtime protocol lets a session control this per server: McpServerConfigDeferTools, with auto (tools may be deferred) and never (tools are always in the initial tool list, even when tool search is enabled). The Python and Rust SDKs expose this setting.

The .NET SDK doesn't. McpServerConfig, McpHttpServerConfig and McpStdioServerConfig have no member for it. Their only members are Type, Tools and Timeout, plus Url, Headers and the OAuth settings for HTTP, and Command, Args, Env and WorkingDirectory for stdio.

Impact

A .NET host can't enable tool search and still keep a chosen MCP server's tools always loaded. It has two options:

  • enable tool search, and every MCP server is deferred, including servers whose tools are needed on almost every turn, which adds a search step before they can be used;
  • leave tool search off, and every tool definition from every server is sent on every model call.

ToolSearchConfig (Enabled, DeferThreshold) applies to the whole session, so it can't single out a server. Per-tool defer exists only for tools the host registers itself, not for MCP server tools.

Environment

  • .NET SDK, with tool search enabled through SessionConfig.ToolSearch and HTTP MCP servers.
Vorherrschende Sprache
Java
Sterne
10.7k
Forks
1.5k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/copilot-sdk

Alle Issues in github/copilot-sdk

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.