In our custom MCP tools, we have a few optional parameters, but the copilot never uses them
Sample 1 will never ask if the user wants to add a Detailed description
Perhaps zod attributes aren't understood the same way by CoPilot.
Description: z
.string()
.optional()
.describe("Detailed description of the task"),
Account_Name: z
.string()
.describe(
"Name of the account associated with the task (optional). Submit 'none' if user does not want an Account."
),
I've resorted to saying it's optional in the description and it can handle that. The MCP server has to make the adjustment to satisfy the API call to the data provider resulting from the request.
Another attempt seems to work most of the time, but isn't completely reliable. I setup a topic and tell it to call a tool after using the topic.
(as a side note, I haven't been able to find any built-in capability to help with dates and times. If making an event and the parameter is asked "What date is the event?" The correct year isn't always added if the user just says "18th of August". I know some of this is baked into the model's training, but doesn't make it any less maddening)