Skip to content

How to intercept a calling to tool of mcp #531

Closed as not planned
Closed as not planned
@NeverMorewd

Description

@NeverMorewd

Is your feature request related to a problem? Please describe.

As a llm chat client, it shoud show a prompt dialog or toast to ask for permit when a mcptool would be invoked.

Describe the solution you'd like
Add new property, type: Func<bool>, name :PermitPredict to McpClientTool.

InvokeMethodAsync()
{
   ...
    if(PermitPredict!=null && PermitPredict.Invoke())
    {
      //execute...
    }
    else
    {
       //cancel
    }
   ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions