Skip to content

Commit d2b7e98

Browse files
authored
refactor: Invocation of schema processors for an inline schema (#31)
1 parent d8dd0d2 commit d2b7e98

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/agent/src/compiler/compiler.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ local function process_tools(raw_spec, additional_tools, trait_contexts, trait_t
294294

295295
if tool_info.inline_schema then
296296
tool_entry.description = tool_info.description or ("Inline tool: " .. canonical_name)
297-
tool_entry.schema = tool_info.inline_schema
297+
tool_entry.schema = get_tools().run_input_schema_processors(tool_info.inline_schema, tool_info.id)
298298
tool_entry.registry_id = tool_info.id -- FIX: Preserve registry_id even with inline schema
299299
tool_entry.meta = {}
300300
else

src/agent/src/discovery/tools.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ local function sanitize_name(name)
5555
end
5656

5757
-- Process the input schema using registered processors
58-
local function run_input_schema_processors(input_schema, tool_id)
58+
function tool_resolver.run_input_schema_processors(input_schema, tool_id)
5959
local registry = get_registry()
6060

6161
local processors = registry.find({ [".kind"] = "function.lua", ["meta.type"] = "input_schema_processor" })
@@ -251,7 +251,7 @@ function tool_resolver.get_tool_schema(tool_id)
251251
name = display_name,
252252
title = entry.meta.title or display_name,
253253
description = description,
254-
schema = run_input_schema_processors(schema, tool_id), -- Process input schema (cached separately)
254+
schema = tool_resolver.run_input_schema_processors(schema, tool_id), -- Process input schema (cached separately)
255255
meta = filter_meta_for_llm(entry.meta) -- Filter out redundant fields
256256
}
257257

0 commit comments

Comments
 (0)