web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Copilot Studio - Model Context Protocol
Suggested answer

Optional parameters in Tool

(2) ShareShare
ReportReport
Posted on by 18
Has anyone had any luck with having their Copilots check for optional parameters and present them to the user with questions?
It seems to skip optional parameters and anything with a default value as well.
I get the right results sometimes if I describe something in a topic and include and instruction like "Run this topic before calling the MCP server"
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    50,275 Super User 2025 Season 2 on at
    Optional parameters in Tool
     
    Can you please share some pictures and explanation of the scenario please.
  • dezrrm Profile Picture
    18 on at
    Optional parameters in Tool
    @Michael E. Gernaey sure, thanks.
    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)
  • Michael E. Gernaey Profile Picture
    50,275 Super User 2025 Season 2 on at
    Optional parameters in Tool
     
    As for Dates, you would have to take what they give you, verify what it is using Power FX, then add the proper format of the date, if the means including the year etc, then you would have to use Power FX to do that before passing it on.
     
     
  • Suggested answer
    DAnny3211 Profile Picture
    132 on at
    Optional parameters in Tool
    Hi,
    
    You're absolutely right to raise this concern. According to the MCP specification, when a client receives a `404` in response to a request containing an expired `Mcp-Session-Id`, it is **required** to initiate a new session by sending a fresh `initialize` request without the session ID. If Copilot Studio fails to do this and instead retries the same request or returns a connector error, that behavior does not align with the protocol.
    
    This could indicate a gap in how Copilot Studio handles session lifecycle events, particularly session expiration. It may be worth checking whether the agent or connector configuration allows for session recovery logic, or if there's a workaround to force reinitialization when a `404` is encountered.
    
    For reference, you can find the relevant protocol behavior documented here:
    - [MCP Protocol Specification – Session Management](https://modelcontextprotocol.io/specification/2024-11-05/server/tools)
    - [Copilot Studio Connector Error Handling](https://learn.microsoft.com/en-us/troubleshoot/power-platform/copilot-studio/actions/connector-request-failure)
    
    Please verify if this response was helpful.
    
    Thanks and best regards,  
    Daniele  
    *Note: This response was prepared with support from Copilot to ensure clarity and completeness.*

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 523 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 378 Super User 2025 Season 2

#3
DAnny3211 Profile Picture

DAnny3211 132

Last 30 days Overall leaderboard