-
Notifications
You must be signed in to change notification settings - Fork 770
feat: Copy the tool input parameters #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Copy the tool input parameters #662
Conversation
The `useCopy()` hook is pretty simple, as it handle a state variable (`copied`) and put it back to false after a `timeout`
c824c6e
to
5bbd9f7
Compare
Hi @olaservo, do you think I could get a review on this PR please 🥺🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @alex210501 , thanks for your patience. I left a minor comment about the error message, plus it looks like there is a CI failure related to an unused variable: https://github.com/modelcontextprotocol/inspector/actions/runs/17366912666/job/49331834386?pr=662
client/src/components/ToolsTab.tsx
Outdated
} catch (error) { | ||
toast({ | ||
title: "Error", | ||
description: `There was an error coping result into the clipboard: ${error instanceof Error ? error.message : String(error)}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: `There was an error coping result into the clipboard: ${error instanceof Error ? error.message : String(error)}`, | |
description: `There was an error copying input to the clipboard: ${error instanceof Error ? error.message : String(error)}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 16e0077
Add the possibility to copy the input parameters of a tool to the clipboard.
Implement the
useCopy()
hook, handling the state variablecopied
, and put it back to false after atimeout
Motivation and Context
Copy the input parameters to the clipboard allows to create reproductible scenarios such as:
Note: Those are scenarios where I needed to copy paste the values of each tool one by one
How Has This Been Tested?
Tested by running
npm test
andnpm run test:e2e
Screen.Recording.2025-07-31.at.00.50.26.mov
Breaking Changes
NA
Types of changes
Checklist
Additional context