Skip to content

Enhancement: Ability to ask user before making Tool Call #5580

Description

@Hrily

What features would you like to see added?

An ability to let Agent ask user before making tool call, especially MCP tool calls.

More details

Sometime tools can mutate data. In such cases, it's better to get user approval before making a MCP tool call.

This is also recommended in MCP guidelines:

https://spec.modelcontextprotocol.io/specification/2024-11-05/#key-principles

User Consent and Control

  • Users must explicitly consent to and understand all data access and operations
  • Users must retain control over what data is shared and what actions are taken
  • Implementors should provide clear UIs for reviewing and authorizing activities

Which components are impacted by your request?

UI

Pictures

This is how Claude Desktop does it:

Image

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. luebken commented on Mar 13, 2025

    @luebken

    I like the current implementation that when you configure an agent that is just uses that tool. So I would vote for a configurable option per tool when to get a user in the loop.

  2. fstadt commented on Jun 19, 2025

    @fstadt

    I am considering contributing towards this issue but a bit lost about how best to continue. I feel like there are many possible ways and opinions about how to implement such a feature and I am unsure how consent about something like this is usually reached in this project.

    Personally, I feel it's very important for "read write" kind of tools to be guarded by user confirmation. Imagine an ai agent with tools for working with a ticket system - you wouldn't want it to have the ability to close or forward tickets without your explicit control. Especially in a company setting, where employees might try to deflect responsibility towards an AI when shit hits the fan ;)

    I also agree not every tool needs user verification, so it should be selective somehow. I believe it's challenging to design the verification in a way that's easy to understand for the user and not too annoying. E.g. showing the tool verification as (distinguishable) part of the chat messages, and instead of denying explicitly you just type your next message and tool use will be denied automatically. That way the AI model would get context about why the tool use was denied and what should be done instead.

    I am not sure if every model provider would play well with receiving a human message after a tool call or tool call response though.

    What are your thoughts here?

  3. vestimir commented on Jun 22, 2025

    @vestimir

    Yep, that's essential for tools that change data. The way Zed implemented it is cool:

    Image

    @danny-avila is this reasonable with the current architecture? What would be the next steps for contributing to this?

  4. owengo commented on Jul 27, 2025

    @owengo
    Contributor

    I realize that this is related to the discussion I started: #8681

    and the related pull request: #8684

    The support for this ability is called "elicitation" in MCP jargon

  5. Animeshz commented on Jul 27, 2025

    @Animeshz

    @owengo is it really elicitation? This is to confirm before calling tool, elicitation to the extent I understood is server initiated request hence part of tool's execution flow (i.e. tool has already been called its asking for confirmation only if code is written like that).

  6. owengo commented on Jul 27, 2025

    @owengo
    Contributor

    Yes, the "elicitation" message is sent by the MCP during tool execution ( typically before doing the actual action ). The server waits for the client's response ( the client in LC in our case ) before going on.
    The mechanism was added to the MCP spec in june and is aimed to make some sttandardization of the human-in-the-loop mechanics.

    https://modelcontextprotocol.io/specification/2025-06-18/client/elicitation

  7. fstadt commented on Jul 27, 2025

    @fstadt

    It's not quite the same thing, but for servers that support it, it allows more elegant human-in-the-loop capabilities for critical tool calls.

  8. owengo commented on Jul 28, 2025

    @owengo
    Contributor

    I think that letting the tool, instead of the client, decide wether confirmation is needed or not is a good approach, even if we've been used to the other way because of how chatgpt handles tool usage.
    Also the spec handles more than just confirmation, it allows to require supplementary data that will not pass thru the llm. For example your email / post address won't be copy-pasted by the llm but directly passed from the client to the mcp server in the elicitation response.

    Obviously the issue right now is that very few MCP servers support the new spec, but hopefully it will change quickly thanks to spec adoption / adherence. If claude code supports it, the main vscode forks & extension will follow and it will be the new norm.

    If the client supports the protocol and the server does not, it's always possible for the client to generate an elicitation itself /before/ the tool call and benefit from the existing, unified client-side implementation. It would probably fit your use-case @fstadt .

    Note that client side there are still many things to handle:

    • the elicitation rendering
    • maybe allowing an answer memorization ( always accept this tool, always put my email in the email form from this elicitation etc .. )
    • timeout management
  9. Animeshz commented on Jul 28, 2025

    @Animeshz

    This is still a security issue. What if tool does not implement safety checks and LLM hallucinate and run the tool with some irrecoverable arguments?

    I'm looking for a way to ask for confirmation before running the tool and it seems like even after proper prompt to ask for confirmation, the llm still calls the tool anyway.

  10. FINDarkside commented on Jul 30, 2025

    @FINDarkside

    I think that letting the tool, instead of the client, decide wether confirmation is needed or not is a good approach, even if we've been used to the other way because of how chatgpt handles tool usage.

    Just to add my perspective, confirmation would be useful even for tools that don’t mutate data. If you use LibreChat to handle sensitive information you risk accidental disclosures if you have any tools enabled. Exposing the exact payload before calling a tool lets you catch any unintended disclosures .

    Even if all MCPs bake in elicitation logic for approvals, I don't think it achieves quite the same thing this kind of configurable feature would. People are going to disagree which tool calls need user confirmation since it often depends on context.

  11. anthonypelletier commented on Aug 22, 2025

    @anthonypelletier

    Hello, I also think it's a security issue, especially when MCP actions are triggered via the submit parameter in the URL of the Automatic Prompt Submission.

  12. notfoundry commented on Aug 26, 2025

    @notfoundry

    Agreed, this really ends up being pretty important for any non-trivial use cases. The Always Allow / Allow / Deny flow someone mentioned above kinda feels like a sweet spot for now getting in the users way if they really don't want it to, but providing some level of accountability and auditability

  13. Oliver777int commented on Sep 24, 2025

    @Oliver777int
    Contributor

    Any updates on this feature?

  14. fstadt commented on Sep 28, 2025

    @fstadt

    This is what I have so far: fstadt@e9321b5

    It's a WIP version where any tool call is paused/withheld and a validation button is displayed. When the validation button is clicked nothing happens though.

    I have no experience with react or tenstack and was struggling to understand the architecture. I also rebased it on the current master today without paying a lot of attention to details. Thus, it might not make a lot of sense - I was trying to play around a bit and understand how things are working before making a "proper" shot at it.

    Still gonna share it here, maybe it's useful in some way or someone can point me in the right direction. I could even direct some resources at work into contributing to this since this feature will be pretty important to us, but none of us have experience with react sadly :/

  15. themrcesi commented on Dec 9, 2025

    @themrcesi

    This is what I have so far: fstadt@e9321b5

    It's a WIP version where any tool call is paused/withheld and a validation button is displayed. When the validation button is clicked nothing happens though.

    I have no experience with react or tenstack and was struggling to understand the architecture. I also rebased it on the current master today without paying a lot of attention to details. Thus, it might not make a lot of sense - I was trying to play around a bit and understand how things are working before making a "proper" shot at it.

    Still gonna share it here, maybe it's useful in some way or someone can point me in the right direction. I could even direct some resources at work into contributing to this since this feature will be pretty important to us, but none of us have experience with react sadly :/

    Thanks for this contribution! I’m currently using your fork with the elicitation support feature, and it’s a game changer. Because of LibreChat’s limitations, HITL wasn’t possible before, which is essential for production-sensitive use cases. Thanks again. @danny-avila, I believe this should be prioritized if possible.

  16. aron-muon commented on Dec 17, 2025

    @aron-muon
    Contributor

    Watching thread - manually approving MCPs is a frank must when dealing with sensitive data.

  17. Spyros-Vl commented on Jan 22, 2026

    @Spyros-Vl

    That would be very good

  18. aron-muon commented on Mar 9, 2026

    @aron-muon
    Contributor

    I have a PR here to close this issue:
    #12152

  19. aron-muon commented on May 26, 2026

    @aron-muon
    Contributor

    FYI, this has been picked up by Danny, these PRs are related (in order)

    1. 🛡️ feat: First-class HITL & permissions surface agents#134
    2. 🪝 feat: HITL Tool Approval Scaffolding (Slice A) #12938
    3. An as-of-yet not created third PR to use latest tag (or minimum, v3.1.78) from agents
  20. aron-muon commented on Jun 24, 2026

    @aron-muon
    Contributor

    Final PR needed:
    #13942

  21. aron-muon commented on Jun 30, 2026

    @aron-muon
    Contributor

    Since #13942 was merged, we can anticiapte this issue to be closed by the next release

  22. aron-muon commented on Jul 7, 2026

    @aron-muon
    Contributor

    Latest in the chain: #14139

  23. danny-avila commented on Aug 17, 2026

    @danny-avila
    Collaborator

    Resolved on dev by the human-in-the-loop tool approval work in #12938 and #13942. Administrators can enable configurable approval policies, and users receive approve, reject, edit, and respond controls before reviewed tool calls execute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions