11import json
22import os
3- from typing import Annotated , Any , Optional
3+ from typing import Annotated , Any
44
55from fastmcp import Context , FastMCP
66
@@ -79,9 +79,9 @@ def get_service_config() -> dict[str, Any]:
7979def create_agent_run (
8080 org_id : Annotated [int , "Organization ID" ],
8181 prompt : Annotated [str , "The prompt/task for the agent to execute" ],
82- repo_name : Annotated [Optional [ str ] , "Repository name (optional)" ] = None ,
83- branch_name : Annotated [Optional [ str ] , "Branch name (optional)" ] = None ,
84- ctx : Optional [ Context ] = None ,
82+ repo_name : Annotated [str | None , "Repository name (optional)" ] = None ,
83+ branch_name : Annotated [str | None , "Branch name (optional)" ] = None ,
84+ ctx : Context | None = None ,
8585) -> str :
8686 """Create a new agent run in the specified organization."""
8787 try :
@@ -112,7 +112,7 @@ def create_agent_run(
112112def get_agent_run (
113113 org_id : Annotated [int , "Organization ID" ],
114114 agent_run_id : Annotated [int , "Agent run ID" ],
115- ctx : Optional [ Context ] = None ,
115+ ctx : Context | None = None ,
116116) -> str :
117117 """Get details of a specific agent run."""
118118 try :
@@ -142,7 +142,7 @@ def get_agent_run(
142142def get_organizations (
143143 page : Annotated [int , "Page number (default: 1)" ] = 1 ,
144144 limit : Annotated [int , "Number of organizations per page (default: 10)" ] = 10 ,
145- ctx : Optional [ Context ] = None ,
145+ ctx : Context | None = None ,
146146) -> str :
147147 """Get list of organizations the user has access to."""
148148 try :
@@ -166,7 +166,7 @@ def get_users(
166166 org_id : Annotated [int , "Organization ID" ],
167167 page : Annotated [int , "Page number (default: 1)" ] = 1 ,
168168 limit : Annotated [int , "Number of users per page (default: 10)" ] = 10 ,
169- ctx : Optional [ Context ] = None ,
169+ ctx : Context | None = None ,
170170) -> str :
171171 """Get list of users in an organization."""
172172 try :
@@ -189,7 +189,7 @@ def get_users(
189189def get_user (
190190 org_id : Annotated [int , "Organization ID" ],
191191 user_id : Annotated [int , "User ID" ],
192- ctx : Optional [ Context ] = None ,
192+ ctx : Context | None = None ,
193193) -> str :
194194 """Get details of a specific user in an organization."""
195195 try :
0 commit comments