Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
676 changes: 676 additions & 0 deletions cli/scripts/cli-metadata-tests.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"content": [
{
"type": "text",
"text": "Echo: complex test"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Invalid parameter format: invalid_format_no_equals. Use key=value format.

Failed with exit code: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Invalid parameter format: invalid_format_no_equals. Use key=value format.

Failed with exit code: 1
218 changes: 218 additions & 0 deletions cli/scripts/metadata-test-output/metadata_integration_all_methods.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
{
"tools": [
{
"name": "echo",
"description": "Echoes back the input",
"inputSchema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message to echo"
}
},
"required": [
"message"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "add",
"description": "Adds two numbers",
"inputSchema": {
"type": "object",
"properties": {
"a": {
"type": "number",
"description": "First number"
},
"b": {
"type": "number",
"description": "Second number"
}
},
"required": [
"a",
"b"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "longRunningOperation",
"description": "Demonstrates a long running operation with progress updates",
"inputSchema": {
"type": "object",
"properties": {
"duration": {
"type": "number",
"default": 10,
"description": "Duration of the operation in seconds"
},
"steps": {
"type": "number",
"default": 5,
"description": "Number of steps in the operation"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "printEnv",
"description": "Prints all environment variables, helpful for debugging MCP server configuration",
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "sampleLLM",
"description": "Samples from an LLM using MCP's sampling feature",
"inputSchema": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "The prompt to send to the LLM"
},
"maxTokens": {
"type": "number",
"default": 100,
"description": "Maximum number of tokens to generate"
}
},
"required": [
"prompt"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "getTinyImage",
"description": "Returns the MCP_TINY_IMAGE",
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "annotatedMessage",
"description": "Demonstrates how annotations can be used to provide metadata about content",
"inputSchema": {
"type": "object",
"properties": {
"messageType": {
"type": "string",
"enum": [
"error",
"success",
"debug"
],
"description": "Type of message to demonstrate different annotation patterns"
},
"includeImage": {
"type": "boolean",
"default": false,
"description": "Whether to include an example image"
}
},
"required": [
"messageType"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "getResourceReference",
"description": "Returns a resource reference that can be used by MCP clients",
"inputSchema": {
"type": "object",
"properties": {
"resourceId": {
"type": "number",
"minimum": 1,
"maximum": 100,
"description": "ID of the resource to reference (1-100)"
}
},
"required": [
"resourceId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "getResourceLinks",
"description": "Returns multiple resource links that reference different types of resources",
"inputSchema": {
"type": "object",
"properties": {
"count": {
"type": "number",
"minimum": 1,
"maximum": 10,
"default": 3,
"description": "Number of resource links to return (1-10)"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "structuredContent",
"description": "Returns structured content along with an output schema for client data validation",
"inputSchema": {
"type": "object",
"properties": {
"location": {
"type": "string",
"minLength": 1,
"description": "City name or zip code"
}
},
"required": [
"location"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
},
"outputSchema": {
"type": "object",
"properties": {
"temperature": {
"type": "number",
"description": "Temperature in celsius"
},
"conditions": {
"type": "string",
"description": "Weather conditions description"
},
"humidity": {
"type": "number",
"description": "Humidity percentage"
}
},
"required": [
"temperature",
"conditions",
"humidity"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
]
}
Loading