[Story] Let the model discover MCP resources
維護者通常 3 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
Start by reading McpHub and the native tool implementations for access_mcp_resource, then trace how allowed and disabled MCP servers are handled. Add list_mcp_resources with the specified paging, query ranking, and metadata fields, and update resource discovery to follow cursors with a page limit. Done means the acceptance criteria pass, including template-only servers and stable offsets.
由索引模型根據 Issue 內容生成。
描述
Context
Zoo Code gets resource and resource template lists from each MCP server. The model does not see them. The model has access_mcp_resource, but it has no source of URIs. A server with many resources (for example, 305) is thus difficult to use.
Part of #584. Starts after #578 merges (#2323). Does not depend on #579.
Related designs: the MCP resources spec leaves this decision to the host application. Codex and Claude Code give the model a tool that lists resources.
Developer Notes
- Add a native tool
list_mcp_resourceswith these optional parameters:query,server_name,offset. - Return a maximum of 20 entries, the total count, and the next offset.
- For each entry, return
server_name,urioruriTemplate,name, and a shortened description. - With
query, rank the entries withBm25Ranker. Include the URI in the ranked text. - If
querymatches nothing, return the first page and say that nothing matched. - Without
query, return the entries in a stable order. - Apply the
allowedMcpServerslist of the mode. Exclude disabled servers. - Offer this tool and
access_mcp_resourcewhen an allowed server has a resource or a template. Today, a server with only templates enables neither. - Follow
nextCursorforresources/listandresources/templates/list. Today,McpHubreads only the first page. Set a page limit. Log a warning at the limit. - Do not put resource entries in the system prompt or the tool definitions.
- Listing needs no approval, because it returns only cached metadata. Reading still needs approval.
Acceptance Criteria
- With 305 resources, one call returns a maximum of 20 entries and the total count.
- A query returns the matching resource, and
access_mcp_resourcecan read its URI. - A query with no match returns the first page.
- The offsets reach each entry exactly one time.
- A server with only templates enables both tools.
- Disallowed servers and disabled servers do not appear.
- A server response with two pages gives all entries.
- The size of the tool definitions does not change with the resource count.
Out of Scope
@mentions for resourcesresources/subscribeandlist_changednotifications- Embeddings ranking
- Filtering by annotations
- Pagination for
tools/list
- 主要語言
- TypeScript
- 星號
- 2k
- 分支
- 301
- 平均合併
- 3 天 14 小時
- 30 天內合併 PR
- 103
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Zoo-Code-Org/Zoo-Code 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 70/100
Zoo-Code-Org/Zoo-Code#2773 · 1 則留言 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
Zoo-Code-Org/Zoo-Code#2717 · 1 則留言 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
維護者通常 3 天內回覆
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on Windows可能已有人在做 @easonLiangWorldedtech 於 16 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
維護者通常 3 天內回覆
-
[BUG] search_files hides matching text on long lines可能已有人在做 @DananjayaNadun 於 9 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
Zoo-Code-Org/Zoo-Code#2496 · 1 則留言 · 已指派 1 人 ·
維護者通常 3 天內回覆
查看 Zoo-Code-Org/Zoo-Code 的全部 Issue
相似的 Issue
-
enhancement
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
ci
難度 2/5 1-3 小時 新手友好度 78/100
ClickHouse/clickhouse-js#1248 ·
維護者通常 1 天內回覆
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechselt未關閉technik
難度 2/5 1-3 小時 新手友好度 78/100
-
bug
難度 2/5 1-3 小時 新手友好度 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 84/100
AhmedNAgy25/analysor#25 ·
維護者通常 1 天內回覆