MCP Tool Usage Examples
This tool can be called via the MCP (Model Context Protocol) endpoint. Here are examples of how to use it:
JSON-RPC Call Example:
POST to https://mcp-1st-birthday-agentic-economics.hf.space/mcp
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gridInvoke",
"arguments": {
"input": "your input here"
}
}
}
cURL Example:
curl -X POST https://mcp-1st-birthday-agentic-economics.hf.space/mcp \\
-H "Content-Type: application/json" \\
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gridInvoke",
"arguments": {
"input": "your input here"
}
}
}'
Python Example:
import requests
import json
url = "https://mcp-1st-birthday-agentic-economics.hf.space/mcp"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "gridInvoke",
"arguments": {
"input": "your input here"
}
}
}
response = requests.post(url, json=payload)
result = response.json()
print(result)
JavaScript/Node.js Example:
const fetch = require('node-fetch');
const url = 'https://mcp-1st-birthday-agentic-economics.hf.space/mcp';
const payload = {
jsonrpc: '2.0',
id: 1,
method: 'tools/call',
params: {
name: 'gridInvoke',
arguments: {
input: 'your input here'
}
}
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data));
Asset Metadata
{
"name": "Grid Invoke",
"description": "Submit a Covia grid operation and return the job status",
"operation": {
"adapter": "grid:invoke",
"toolName": "gridInvoke",
"input": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"description": "Operation alias or asset ID to invoke"
},
"input": {
"type": "any",
"description": "Arguments to pass to the operation"
},
"venue": {
"type": "string",
"description": "Optional remote venue URL or DID to connect to"
}
},
"required": ["operation"]
},
"output": {
"type": "object",
"description": "Job status information returned by the venue",
"properties": {
"id": {
"type": "string",
"description": "Remote job identifier"
},
"status": {
"type": "string",
"description": "Current job status (e.g. PENDING, STARTED, COMPLETE, FAILED, CANCELLED)"
},
"created": {
"type": "integer",
"description": "Timestamp when the job was created (milliseconds since epoch)",
"format": "int64"
},
"updated": {
"type": "integer",
"description": "Timestamp when the job status was last updated (milliseconds since epoch)",
"format": "int64"
},
"output": {
"type": "any",
"description": "Operation output, when available"
},
"error": {
"type": "string",
"description": "Error message if the job failed"
}
}
}
}
}