Skip to content

Conversation

@k255
Copy link
Contributor

@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
@f
Copy link
Owner

f commented Jul 6, 2025

Can you fix the lint issues?

@k255 k255 force-pushed the feature/proxy-optional-params branch from 637a87f to e119a5f Compare July 6, 2025 21:09
@k255
Copy link
Contributor Author

k255 commented Jul 6, 2025

Can you fix the lint issues?

done

@f f merged commit 4a29eb5 into f:master Jul 8, 2025
2 checks passed
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.

2 participants