Team Ai
Apppublic

programmingwithabdullah/todo-aipowered

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes
update_task.cpython-314.pyc34 linesDownload Raw Back to __pycache__
1+
20~�i�
�3��Rt^RIHt^RIHtHtHt^RIHt]!RR7]!RRR7]!R	RR7]!R4^�RR7]!RR
RR73RRllt	R#)zG5MCP Tool: update_task6Purpose: Update an existing task by ID or title7)�Field)�Dict�Any�Optional)�get_session_contextzUser's ID from JWT context)�descriptionzTask ID to updateN)r�defaultz2Task title to search for (if task_id not provided)zNew task title (max 200 chars))r�8max_lengthrz%New task description (max 1000 chars)��c���V^8�dQhR\R\\,R\\,R\\,R\\,R\\\3,/#)��user_id�task_id�9task_title�titler�return)�strr�intrr)�formats"�[D:\hackathon - II\phase - III\phase - iii\phase-III\backend\mcp_server\tools\update_task.py�__annotate__rsl��VK�VK�
�VK�
�c�]�VK���
�VK��C�=�
VK��#��VK�10�#�s�(�^�VK�c11��0"�VfV'gRRRR/#Ve\V4^�8�dRRRR/#Ve\V4R8�dRRRR/#/pVeVP4VR&VeVP4VR	&V'gRR12RR/#\4;_uu_4p^RIHp^RIHp^R
IHp	V	!WW4wr�V'd
VuuRRR4#V!4pV!R/VBp
VPW13PW�4pRVPRVPR	VPRR/uuRRR4# +'giR#;i \dLp^RIHp\!TT4'dRR\#T42RR/uRp?#RR\#T42RR/uRp?#Rp?ii;i5i)a�14Update an existing task by ID or title.15 16Args:17    user_id: User's ID from JWT context18    task_id: Task ID to update (optional if task_title provided)19    task_title: Task title to search for (optional if task_id provided)20    title: New task title (optional, max 200 chars)21    description: New task description (optional, max 1000 chars)22 23Returns:24    dict: {task_id, title, description, status} or {error, status} or {disambiguation, matches, status}25N�errorz7Please provide either a task ID or task title to update�statusz$Title must be 200 characters or lessr26z+Description must be 1000 characters or lessrrz?No updates provided. Please specify a new title or description.)�TaskService)�27TaskUpdate)�resolve_taskr�updated)�SQLAlchemyErrorzDatabase error: zUnexpected error: �)�len�stripr�services.task_servicer�schemas.task_schemasr�mcp_server.tool_utilsr�update_task�idrr�	Exception�sqlalchemy.excr�28isinstancer)r
rrrr�updates�dbrrr�task�error_response�task_service�task_update�updated_task�ers&&&&&            rr&r&s����8:K��?�:��R��'��
����U��c�!1��C�X�w�W�W��"�s�;�'7�$�'>��F��'��
�����$�{�{�}�G�G���"�%0�%6�%6�%8�G�M�"���Z��'��
�29!�
"�
"�b�9�7�:�$0��W�#Q� �D��%�#�
"�'�=�L�$�/�w�/�K�'�3�3�G�W�W�k�V�L��<�?�?���+�+��|�7�7��)�	�#�
"�
"�
"��,�K�2��a��)�)��/��A��x�8�(�G�L�L��-�c�!�f�X�6��'�J�J��K�s��F�D=�D=�F�D=�F�D=�	F�307D=�D=�F�D=�'D)�31D=�F�AD)�32D=�(F�)D:	�4D=�8F�:D=�=F�)F�1F�2F�7F�F�	F�F�F)33�__doc__�pydanticr�typingrrr�databaserr&r rr�<module>r7sn���34�&�&�(��%A�B�"�/B�D�Q� %�H�RV�!�!�4��d��"'�;���"�VK�VKr