-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
The schema specifies
export interface Tool {
/**
- The name of the tool.
/
name: string;
/* - A human-readable description of the tool.
/
description?: string;
/* - A JSON Schema object defining the expected parameters for the tool.
*/
inputSchema: {
type: "object";
properties?: { [key: string]: object };
required?: string[];
};
}
but many servers, such as fileSystem, etc have additional fields for inputSchema such as "additionalProperties" and "$schema"
{
"name": "read_file",
"description": "Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Only works within allowed directories.",
"inputSchema": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
I did a quick scan of the spec, but I could not find if it additional fields are allowed and that servers and clients should ignore those.
Independent of that, I believe that if servers routinely send "additionalProperties" and "$schema" it would be good to add those keys to the inputSchema schema.