Skip to main content
Glama
models.cpython-312.pyc6.03 kB
� ���h: ���dZddlmZddlmZddlmZmZddlmZm Z Gd�de e�Z Gd�d e�Z Gd �d e�Z Gd �d e�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd �d!e�ZGd"�d#e�Zy$)%z3Pydantic data models for MCP Background Job Server.�)�datetime)�Enum)�List�Optional)� BaseModel�Fieldc� �eZdZdZdZdZdZdZy)� JobStatuszStatus of a background job.�running� completed�failed�killedN)�__name__� __module__� __qualname__�__doc__�RUNNING� COMPLETED�FAILED�KILLED���V/Users/dylan/Workspace/mcp/servers/mcp-background-job/src/mcp_background_job/models.pyr r s��%��G��I� �F� �Frr c���eZdZUdZedd��Zeed<edd��Zeed<edd��Z e ed <edd ��Z e ed <ed d ��Z ee ed<ed d��Zeeed<ed d��Zeeed<y )� BackgroundJobz$Complete background job information..�UUID v4 job identifier�� description�job_id�Shell command being executed�command�Current job status�status�UTC timestamp when job started�startedNz UTC timestamp when job completedr zProcess exit code� exit_codez Process ID�pid)rrrrrr�str�__annotations__r!r#r r%rr rr&�intr'rrrrrs���.���)A�B�F�C�B���*H�I�G�S�I��c�/C�D�F�I�D��c�/O�P�G�X�P�$)� �<�%�I�x��!�� %�T�7J�K�I�x��}�K��t��>�C��#��>rrc��eZdZUdZedd��Zeed<edd��Ze ed<edd��Z eed <edd ��Z e ed <y ) � JobSummaryz/Minimal job information for listing operations..rrrr"r#r r!r$r%N) rrrrrrr(r)r#r r!r%rrrrr,r,!sM��9���)A�B�F�C�B��c�/C�D�F�I�D���*H�I�G�S�I��c�/O�P�G�X�Prr,c�N�eZdZUdZedd��Zeed<edd��Zeed<y) � ProcessOutputz/Structured stdout/stderr output from a process..�Standard output contentr�stdout�Standard error content�stderrN� rrrrrr0r(r)r2rrrr.r.*s)��9���)B�C�F�C�C���)A�B�F�C�Brr.c�N�eZdZUdZedd��Zeed<edd��Zeed<y) �JobInteractionResultz+Result from interacting with a job's stdin..r/rr0r1r2Nr3rrrr5r51s)��5���)B�C�F�C�C���)A�B�F�C�Brr5c�0�eZdZUdZedd��Zeed<y)� ExecuteInputzInput for execute tool..zShell command to executerr!N)rrrrrr!r(r)rrrr7r7;s��!���*D�E�G�S�Err7c�0�eZdZUdZedd��Zeed<y)� ExecuteOutputzOutput from execute tool..rrrN�rrrrrrr(r)rrrr9r9As��#���)A�B�F�C�Brr9c�R�eZdZUdZedd��Zeed<edddd � �Ze ed <y ) � TailInputzInput for tail tool..zJob ID to tailrr�2zNumber of lines to return�i�)r�ge�le�linesN) rrrrrrr(r)rAr*rrrr<r<Gs-�����)9�:�F�C�:��r�'B�q�T�R�E�3�Rrr<c�0�eZdZUdZedd��Zeed<y)� StatusInputzInput for status tool..zJob ID to checkrrNr:rrrrCrCNs�� ���):�;�F�C�;rrCc�0�eZdZUdZedd��Zeed<y)� StatusOutputzOutput from status tool..r"rr#N)rrrrrr#r r)rrrrErETs��"��c�/C�D�F�I�DrrEc�0�eZdZUdZedd��Zeed<y)� KillInputzInput for kill tool..zJob ID to killrrNr:rrrrGrGZs�����)9�:�F�C�:rrGc�0�eZdZUdZedd��Zeed<y)� KillOutputzOutput from kill tool..z;Kill result: 'killed', 'already_terminated', or 'not_found'rr#N)rrrrrr#r(r)rrrrIrI`s�� �� �V��F�C�rrIc�0�eZdZUdZedd��Zeed<y)� OutputInputzInput for output tool..zJob ID to get output fromrrNr:rrrrKrKhs�� ���)D�E�F�C�ErrKc�N�eZdZUdZedd��Zeed<edd��Zeed<y) � InteractInputzInput for interact tool..zJob ID to interact withrrz Input to send to the job's stdin�inputN) rrrrrrr(r)rNrrrrMrMns)��"���)B�C�F�C�C��s�(J�K�E�3�KrrMc�6�eZdZUdZedd��Zeeed<y)� ListOutputzOutput from list tool..zList of all background jobsr�jobsN) rrrrrrQrr,r)rrrrPrPus�� �"�3�4Q�R�D�$�z� �RrrPN)rr�enumr�typingrr�pydanticrrr(r rr,r.r5r7r9r<rCrErGrIrKrMrPrrr�<module>rUs���9���!�%���T�� ?�I� ?�Q��Q�C�I�C�C�9�C�F�9�F� C�I�C� S� �S�<�)�<� E�9�E� ;� �;� ���F�)�F� L�I�L�S��Sr

Latest Blog Posts

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/dylan-gluck/mcp-background-job'

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