AI Tools
Define una herramienta LLM una vez y genera payloads de function-calling validados para OpenAI, Anthropic y Gemini.
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'http://127.0.0.1:3003/es/api/tools/llm-tool-calling-json-schema-builder' \
-H 'Content-Type: application/json' \
-d '{"toolName":"get_weather","toolDescription":"Get the current weather for a city. Use when the user asks about temperature, conditions, or whether it will rain today.","paramsInput":"city | string | required | City name, e.g. \"Paris\"\nunits | enum<celsius,fahrenheit> | optional | Temperature unit for the report\nforecast_days | integer | optional | Days of forecast to include (1-7)","strictMode":true,"toolChoice":"auto"}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST http://127.0.0.1:3003/es/api/tools/llm-tool-calling-json-schema-builder| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| toolName | text | Sí | — |
| toolDescription | textarea | Sí | — |
| paramsInput | textarea | Sí | — |
| strictMode | checkbox | No | — |
| toolChoice | select | Sí | — |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-llm-tool-calling-json-schema-builder": {
"name": "llm-tool-calling-json-schema-builder",
"description": "Define una herramienta LLM una vez y genera payloads de function-calling validados para OpenAI, Anthropic y Gemini.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=llm-tool-calling-json-schema-builder",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "llm-tool-calling-json-schema-builder",
"arguments": {
"toolName": "get_weather",
"toolDescription": "Get the current weather for a city. Use when the user asks about temperature, conditions, or whether it will rain today.",
"paramsInput": "city | string | required | City name, e.g. \"Paris\"\nunits | enum<celsius,fahrenheit> | optional | Temperature unit for the report\nforecast_days | integer | optional | Days of forecast to include (1-7)",
"strictMode": true,
"toolChoice": "auto"
}
}
}¿Dudas o problemas? Contacta con [email protected]