Format Conversion
Convierte fórmulas entre AsciiMath, LaTeX y MathML: detecta el formato de entrada y produce LaTeX canónico, MathML de presentación con anotación semántica, retro-traducción aproximada a AsciiMath, fragmento aria-label para lectores de pantalla y una vista previa KaTeX.
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'http://127.0.0.1:3003/es/api/tools/asciimath-latex-mathml-equation-converter' \
-H 'Content-Type: application/json' \
-d '{"input":"sum_(i=1)^n (i^3)","fromFormat":"auto","displayMode":true,"includeAnnotation":true,"includeAriaLabel":true,"showPreview":true}'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/asciimath-latex-mathml-equation-converter| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| input | textarea | Sí | — |
| fromFormat | select | No | — |
| displayMode | checkbox | No | Render as a display/block equation rather than inline. |
| includeAnnotation | checkbox | No | Wrap MathML in <semantics> with an <annotation> carrying the LaTeX source. |
| includeAriaLabel | checkbox | No |
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-asciimath-latex-mathml-equation-converter": {
"name": "asciimath-latex-mathml-equation-converter",
"description": "Convierte fórmulas entre AsciiMath, LaTeX y MathML: detecta el formato de entrada y produce LaTeX canónico, MathML de presentación con anotación semántica, retro-traducción aproximada a AsciiMath, fragmento aria-label para lectores de pantalla y una vista previa KaTeX.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=asciimath-latex-mathml-equation-converter",
"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": "asciimath-latex-mathml-equation-converter",
"arguments": {
"input": "sum_(i=1)^n (i^3)",
"fromFormat": "auto",
"displayMode": true,
"includeAnnotation": true,
"includeAriaLabel": true,
"showPreview": true
}
}
}| Expose the canonical LaTeX through aria-label on a role=math wrapper. |
| showPreview | checkbox | No | Server-side KaTeX HTML+MathML preview (front-end needs katex.min.css). |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}¿Dudas o problemas? Contacta con [email protected]