Skip to content

Commit a9d1eb0

Browse files
committed
fix(core): always advertise get_tool_schema meta-tool
Revert the hasDeferred gating so the get_tool_schema catalog entry is exposed unconditionally, matching upstream semantics and the tool registry, webfetch, websearch, location-layer, and session-runner expectations. The gating left those test suites failing after the upstream sync.
1 parent e27f636 commit a9d1eb0

1 file changed

Lines changed: 13 additions & 17 deletions

File tree

packages/core/src/tool/registry.ts

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ const registryLayer = Layer.effect(
170170
const activated = yield* Ref.get(activatedToolsRef)
171171
const touched = yield* Ref.get(touchedPathsRef)
172172
const defs: Array<ToolDefinition> = []
173-
let hasDeferred = false
174173
for (const [name, registration] of registrations) {
175174
const tool = registration.tool
176175
const deferred = isDeferred(tool)
@@ -186,7 +185,6 @@ const registryLayer = Layer.effect(
186185
if (!shouldActivate) continue
187186
}
188187
if (deferred && !activated.has(name)) {
189-
hasDeferred = true
190188
const fullDef = definition(name, tool)
191189
defs.push(
192190
new ToolDefinition({
@@ -199,22 +197,20 @@ const registryLayer = Layer.effect(
199197
}
200198
defs.push(definition(name, tool))
201199
}
202-
if (hasDeferred) {
203-
defs.push(
204-
new ToolDefinition({
205-
name: GET_TOOL_SCHEMA,
206-
description:
207-
'Get the full schema (including input/output parameters) for a deferred tool. Input: { "tool_name": "<name>" }',
208-
inputSchema: {
209-
type: "object",
210-
properties: {
211-
tool_name: { type: "string", description: "Name of the tool to get the full schema for" },
212-
},
213-
required: ["tool_name"],
200+
defs.push(
201+
new ToolDefinition({
202+
name: GET_TOOL_SCHEMA,
203+
description:
204+
'Get the full schema (including input/output parameters) for a deferred tool. Input: { "tool_name": "<name>" }',
205+
inputSchema: {
206+
type: "object",
207+
properties: {
208+
tool_name: { type: "string", description: "Name of the tool to get the full schema for" },
214209
},
215-
}),
216-
)
217-
}
210+
required: ["tool_name"],
211+
},
212+
}),
213+
)
218214
return {
219215
definitions: defs,
220216
settle: (input) => {

0 commit comments

Comments
 (0)