Skip to content

Commit 136119b

Browse files
committed
chore: update version to 0.2.0-beta.2 and refine tool name handling in ComposableMCPServer
1 parent cffa6e7 commit 136119b

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

packages/core/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mcpc/core",
3-
"version": "0.2.0-beta.1",
3+
"version": "0.2.0-beta.2",
44
"exports": {
55
".": "./mod.ts",
66
"./plugins": "./plugins.ts",

packages/core/src/compose.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -585,15 +585,21 @@ export class ComposableMCPServer extends Server {
585585

586586
const toolNameToDetailList = Object.entries(tools);
587587

588+
// Tools will be seen by LLM in tools config
588589
const globalToolNames = this.getPublicToolNames();
589-
const externalToolNames = toolNameToDetailList
590-
.map(([name]) => name)
591-
.filter((n) => !globalToolNames.includes(n));
592-
const internalToolNames = this.getInternalToolNames();
590+
593591
const hideToolNames = this.getHiddenToolNames();
592+
const internalToolNames = this.getInternalToolNames();
593+
594+
// Tools will be seen by LLM in agentic tool definition
595+
const contextToolNames = toolNameToDetailList
596+
.map(([name]) => name)
597+
.filter((n) =>
598+
!globalToolNames.includes(n) && !hideToolNames.includes(n)
599+
);
594600

595601
// For agentic interface: external tools (non-hidden) + internal tools
596-
const allToolNames = [...externalToolNames, ...internalToolNames];
602+
const allToolNames = [...contextToolNames, ...internalToolNames];
597603

598604
// Add global tools to server
599605
globalToolNames.forEach((toolId) => {

0 commit comments

Comments
 (0)