You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fdbfba0
Browse filesBrowse the repository at this point in the historyBrowse files
// Tools whose full schema is always advertised to the model. Everything else is
18
-
// registered but discovered on demand via tool_search, which promotes matches
19
-
// onto the call gate and the next infer's wire set. Shared by the system prompt
18
+
// registered but discovered on demand via tool_search, which returns name +
19
+
// description cards only. A found tool's schema joins the wire when the model
20
+
// actually calls it (promote-on-execute). Shared by the system prompt
20
21
// and the advertised-set gate so the two never drift.
21
22
//
22
23
// `present` is deliberately absent: most sessions never render a view, and at
@@ -202,9 +203,9 @@ export function advertisedTools(
202
203
}
203
204
204
205
// Tracks which non-built-in tool names the session has activated (via
205
-
// tool_search matches, or a director-side trigger like the lsp hint), in
206
-
// first-activation order. Backed by a Set, so re-activating an already-active
207
-
// name is a no-op — it neither reorders nor duplicates the entry.
206
+
// promote-on-execute of a called name, or a director-side trigger like the
207
+
// lsp hint), in first-activation order. Backed by a Set, so re-activating an
208
+
// already-active name is a no-op — it neither reorders nor duplicates the entry.
208
209
exportinterfaceActivatedToolTracker{
209
210
// Adds any new names and returns whether the set actually changed.
210
211
activate(names: readonlystring[]): boolean;
@@ -243,14 +244,19 @@ export function createActivatedToolTracker(): ActivatedToolTracker {
243
244
exportconsttoolSearchDefinition: ToolDefinition={
244
245
name: "tool_search",
245
246
description:
246
-
"Discover callable tools by capability. Most tools — MCP servers, present, and other integrations — are not on the wire until this search promotes them onto the next inference. Core tools (read, bash, web_fetch, web_search, spawn_agent, …) are already on the wire — do not tool_search for them. wait_agents is mounted on exec-primary runs only, so it is not on the wire elsewhere and this search cannot promote it there. Call this with a short description of what you need (e.g. 'issue tracker', 'render layout', 'granola notes') to get a ranked handful of matching names and short descriptions. Matched tools join the next inference tool list — call them on the next turn, not from this result.",
247
+
"Discover callable tools by capability. Most tools — MCP servers, present, and other integrations — are found here as name + description cards; their schemas join the wire when you actually call them. Core tools (read, bash, web_fetch, web_search, spawn_agent, …) are already on the wire — do not tool_search for them. wait_agents is mounted on exec-primary runs only, so it is not on the wire elsewhere and this search cannot surface it there. Call this with a short description of what you need (e.g. 'issue tracker', 'render layout', 'granola notes') to get a ranked handful of matching names and short descriptions (default 5, overridable via limit, max 20). Search does not add schemas to the tool list — call a returned name to use it.",
247
248
inputSchema: {
248
249
type: "object",
249
250
properties: {
250
251
query: {
251
252
type: "string",
252
253
description: "A short description of the capability you need.",
253
254
},
255
+
limit: {
256
+
type: "number",
257
+
description:
258
+
"Max matches to return (default 5, hard cap 20). Override when you need a wider set.",
0 commit comments