diff --git a/src/services/llm/tools/note_creation_tool.ts b/src/services/llm/tools/note_creation_tool.ts index 58cd34dc4..d5f84df70 100644 --- a/src/services/llm/tools/note_creation_tool.ts +++ b/src/services/llm/tools/note_creation_tool.ts @@ -44,7 +44,21 @@ export const noteCreationToolDefinition: Tool = { }, attributes: { type: 'array', - description: 'Array of attributes to set on the note (e.g., [{"name":"#tag"}, {"name":"priority", "value":"high"}])' + description: 'Array of attributes to set on the note (e.g., [{"name":"#tag"}, {"name":"priority", "value":"high"}])', + items: { + type: 'object', + properties: { + name: { + type: 'string', + description: 'Name of the attribute' + }, + value: { + type: 'string', + description: 'Value of the attribute (optional)' + } + }, + required: ['name'] + } } }, required: ['title', 'content'] diff --git a/src/services/llm/tools/tool_interfaces.ts b/src/services/llm/tools/tool_interfaces.ts index 37be43786..9cff91f46 100644 --- a/src/services/llm/tools/tool_interfaces.ts +++ b/src/services/llm/tools/tool_interfaces.ts @@ -1,6 +1,6 @@ /** * Tool Interfaces - * + * * This file defines the interfaces for the LLM tool calling system. */ @@ -27,6 +27,11 @@ export interface ToolParameter { type: string; description: string; enum?: string[]; + items?: ToolParameter | { + type: string; + properties?: Record; + required?: string[]; + }; } /** @@ -49,7 +54,7 @@ export interface ToolHandler { * Tool definition to be sent to the LLM */ definition: Tool; - + /** * Execute the tool with the given arguments */