It is not only happening with the function logic but also with the description. The old description is still reflected while I have update the description.
function buildGetMyLeavesTool() {
return {
name: "get-my-leaves",
description: `
Lists all the leaves taken by the user based on the filters applied. CRITICAL GUIDANCE FOR THE AI:
- When the user asks for leave history in a specific year, month range, or "which months I took X leave", ALWAYS use a single broad date range instead of calling the tool multiple times per month.
- Use this tool for any past leave history questions instead of balance tool.`,
inputSchema: {
type: "object",
properties: {
searchString: {
type: "string",
default: "",
description: "This filters the leaves by matching the this string on leave's reason, type (e.g., 'PL', 'Privilege Leave', 'family function'). Use this to filter specific leave types."
},
fromDate: {
type: ["string", "null"],
default: null,
description: "Filters those leaves which starts either on or after this date. YYYY-MM-DD format"
},
toDate: {
type: ["string", "null"],
default: null,
description: "Filters those leaves which starts either on or before this date. YYYY-MM-DD format"
},
sortBy: {
type: "string",
default: "AppliedOn",
description: `It is the basis field on which the list is sorted. Call leave-sort-by-options tool for values of SortBy options .`
},
sortOrder: {
type: "string",
default: "DESC",
description: "It defines the sort order of the list; use ASC and DESC for ascending descending sorting respectively."
}
}
},
execute: async (inputParameters = {}) => getMyLeavesAjax(inputParameters)
}
}
The tool reflected the old description:
It lists all the leaves taken by the user in constraint to the filters applied. CRITICAL GUIDANCE FOR THE AI: - When the user asks for leave history in a specific year, month range, or "which months I took X leave", ALWAYS use a single broad date range instead of calling the tool multiple times per month. - Use this tool for any past leave history questions instead of balance tool.
{ "type": "object", "properties": { "searchString": { "type": "string", "default": "", "description": "This filters the leaves by matching the this string on leave's reason, type (e.g., 'PL', 'Privilege Leave', 'family function'). Use this to filter specific leave types." }, "fromDate": { "type": [ "string", "null" ], "default": null, "description": "Filters those leaves which starts either on or after this date. YYYY-MM-DD format" }, "toDate": { "type": [ "string", "null" ], "default": null, "description": "Filters those leaves which starts either on or before this date. YYYY-MM-DD format" }, "sortBy": { "type": "string", "default": "AppliedOn", "description": "It is the basis field on which the list is sorted. Call leave-sort-by-options tool for values of SortBy options ." }, "sortOrder": { "type": "string", "default": "DESC", "description": "It defines the sort order of the list; use ASC and DESC for ascending descending sorting respectively." } } }
get-my-leaves
The bold line in the description is the change.
Note: My Chrome is updated to the latest version.
Hope it will give the better clarity.