Skip to main content
Glama

MCP: Multi-Agent Control Point

by Gomezzz299
clima.cpython-312.pyc2.39 kB
� �:4h>��:�ddlZddlmZddlmZGd�de�Zy)�N)� AgenteBase)�AgenteUbicacionc�$�eZdZdZgd�Zdefd�Zy)� AgenteClimauR Agente que proporciona el clima actual según la ubicación del usuario. ) z \bclima\bz \btiempo\bu\bqu[eé] tiempo hace\bu\bc[oó]mo est[aá] el clima\bu\bc[oó]mo est[aá] el tiempo\bu\bqu[eé] clima hay\bu\bqu[eé] clima hace\bz\btemperatura\bz\bva a llover\bu\bhace fr[ií]o\bz\bhace calor\bu\best[aá] lloviendo\bu\bpron[oó]stico\b�returnc�(�t|j��}|j�}t|t�r|j d�sddd�S|dj dd�}|dj d �}|sdd d�St t|jd ��\}}d |�d |�d�}tj |�}|j�} | j di�} || j d�d| j d�| j d�d�S)N)�llm�successFu<No se pudo determinar la ubicación para consultar el clima.)r �error�data�ciudad� desconocida�locu5No se encontró la latitud/longitud en la ubicación.�,z0https://api.open-meteo.com/v1/forecast?latitude=z &longitude=z&current_weather=true�current_weather� temperatureu°C� windspeed� weathercode)r � temperatura�unidad�viento� descripcion) rr �agente� isinstance�dict�get�map�float�split�requests�json) �self�agente_ubicacion� ubicacionr r�lat�lon�url�rr �weathers �+/home/agomez/Proyectos/MCP/agentes/clima.pyrzAgenteClima.agentes��*�t�x�x�8��$�+�+�-� ��)�T�*�)�-�-� �2J� �W�� � �6�"�&�&�x��?�����#�#�E�*��� �P�� � �u�c�i�i��n�-���S�?�s�e�;�s�e� #� $� � �L�L�� ���v�v�x���(�(�,�b�1���"�;�;�}�5���k�k�+�.�"�;�;�}�5�  � �N)�__name__� __module__� __qualname__�__doc__�patronesrr�r+r*rrs����H� " ��" r+r)r �utils.agente_baser�agentes.ubicacionrrr1r+r*�<module>r4s���(�-�6 �*�6 r+

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Gomezzz299/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server