compara
Compare two topics visually by generating a side-by-side mind map to analyze relationships, differences, and connections effectively.
Instructions
Gera um mapa mental comparando dois temas.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tema1 | Yes | ||
| tema2 | Yes |
Input Schema (JSON Schema)
{
"properties": {
"tema1": {
"title": "Tema1",
"type": "string"
},
"tema2": {
"title": "Tema2",
"type": "string"
}
},
"required": [
"tema1",
"tema2"
],
"title": "comparaArguments",
"type": "object"
}
Implementation Reference
- server.py:9-18 (handler)The handler function for the 'compara' tool. It takes two string parameters (tema1, tema2) and returns a formatted string representing a mind map comparison between the two themes, listing key topics like definitions, characteristics, pros/cons, applications, and differences/similarities.def compara(tema1: str, tema2: str) -> str: """Gera um mapa mental comparando dois temas.""" return ( f"Comparação entre {tema1} e {tema2}, focando somente nos tópicos abaixo:\n" f"- Definições de {tema1} e {tema2}\n" f"- Características principais\n" f"- Vantagens e desvantagens\n" f"- Aplicações práticas\n" f"- Diferenças e semelhanças" )
- server.py:8-8 (registration)Registers the 'compara' function as an MCP tool with the name 'compara' using the FastMCP decorator.@mcp.tool(name="compara")
- server.py:9-9 (schema)Input schema defined by function parameters: tema1 (str), tema2 (str); output: str. The docstring provides additional description.def compara(tema1: str, tema2: str) -> str: