Skip to content

Support optional parameters in proxy mode #64

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

k255
Copy link

@k255 k255 commented Jun 26, 2025

Description

While registering shell scripts as MCP tools is a great feature in its current implementation all parameters are marked as required.
Having the option to mark some parameters as optional greatly improves flexibility.

With the proposed change, to mark given parameter as optional, you just wrap it in brackets, e.g.:

{
  "add_operation": {
    "command": "echo \"$msg$a + $b = $(($a+$b))\"",
    "description": "Adds a and b with optional result msg",
    "parameters": "a:int,b:int,[msg:string]",
    "script": ""
  }
}

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

This was tested with provided 'mcp web' interface

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@k255 k255 force-pushed the feature/proxy-optional-params branch from 069379d to 637a87f Compare June 26, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant