Activity
Defines the activity schema.
References
NONE
Activity
Bases: BaseModel
Base schema for any activity.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
The type of activity being performed. Defaults to an empty string. |
MCPCallActivity
Bases: Activity
Schema for MCP tool call.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
Literal[MCP_CALL]
|
The type of activity being performed. Defaults to ActivityType.MCP_CALL. |
server_name |
str
|
The name of the MCP server. |
tool_name |
str
|
The name of the tool. |
args |
dict[str, str]
|
The arguments of the tool. |
MCPListToolsActivity
Bases: Activity
Schema for listing tools in MCP.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
Literal[MCP_LIST_TOOLS]
|
The type of activity being performed. Defaults to ActivityType.MCP_LIST_TOOLS. |
server_name |
str
|
The name of the MCP server. Defaults to an empty string. |
tools |
list[dict[str, str]] | None
|
The tools in the MCP server. Defaults to None. |
WebSearchActivity
Bases: Activity
Schema for web search tool call.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
WebSearchActivityTypes
|
The type of activity being performed. Defaults to ActivityType.SEARCH. |
query |
str | None
|
The query of the web search. Defaults to None. |
url |
str | None
|
The URL of the page. Defaults to None. |
pattern |
str | None
|
The pattern of the web search. Defaults to None. |
sources |
list[dict[str, str]] | None
|
The sources of the web search. |
model_dump(*args, **kwargs)
Serialize the activity for display.
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
dict[str, str]: The serialized activity. |