-
Notifications
You must be signed in to change notification settings - Fork 706
Description
When looking at the output schema, I find that all optional output fields (except strings) are defined as pointers. Looking at the .outputSchema
property for the run_shell_command
tool:
{
"type": "object",
"required": [
"stdout",
"stderr"
],
"properties": {
"error": {
"type": "string",
"description": "Any error message reported by the subprocess."
},
"exit_code": {
"type": [
"null",
"integer"
],
"description": "Exit code of the command."
},
"stderr": {
"type": "string",
"description": "Output from the standard error stream."
},
"stdout": {
"type": "string",
"description": "Output from the standard output stream."
}
},
"additionalProperties": false
}
exit_code
has a type of null
, or integer
, but that is kind of redundant because it is not a required output fields.
But error
is not a required output field either, and it is just string
, and not null
, or string
, which feels inconsistent.
But ignoring this, why is exit_code
not a required output value? Does the tool ever return before the shell command exits? How can you not have an output value?
I think the description of error
is also confusing, as it is not an error reported by the subprocess, but an error reported by the MCP because running the subprocess failed.