What are parameters?
Parameters are the inputs your tool receives from the AI. When the AI decides to call your tool, it constructs a JSON payload matching your parameter schema. MCPCore validates this payload before your code runs. Your code accesses parameters through theparams object:
Adding parameters
In the tool editor, click Add parameter for each input your code needs.Parameter fields
Supported types
string
A plain text value.
number
An integer or floating-point number.
boolean
true or false.
array
A JSON array. Use the Items type field to specify the type of each element.
object
A JSON object with sub-properties. Define each sub-property with its own type and description.
Best practices for parameter descriptions
The AI reads the parameter description to understand what value to pass. Good descriptions reduce tool call errors.Parameter validation
MCPCore validates every tool call against your parameter schema before running the code. If validation fails:- Missing required parameters →
400error returned to the AI - Wrong type →
400error with a clear message - Your code is never executed
Optional parameters
For optional parameters, always provide a sensible default value or handle theundefined case in code: