Expose ShotGrid functionality to LLMs through MCP tools
@tool
Decorator@server.tool()
:
find_shots
) as the tool name.typing
module and Pydantic.
Type Annotation | Example | Description | |
---|---|---|---|
Basic types | int , float , str , bool | Simple scalar values | |
Container types | List[str] , Dict[str, int] | Collections of items | |
Optional types | Optional[float] , `float | None` | Parameters that may be null/omitted |
Union types | `str | int, Union[str, int]` | Parameters accepting multiple types |
Literal types | Literal["ip", "cmpt"] | Parameters with specific allowed values | |
Pydantic models | AssetData | Complex structured data |
task_id
. The other parameters are optional.
def
) and asynchronous (async def
) functions as tools:
async def
when your tool needs to perform operations that might wait for external systems (like complex ShotGrid queries) to keep your server responsive.