Classes
ToolInfo
4
▼
Frozen snapshot of an MCP tool descriptor.
ToolInfo
4
▼
Frozen snapshot of an MCP tool descriptor.
Attributes
| Name | Type | Description |
|---|---|---|
name |
str
|
— |
description |
str
|
— |
input_schema |
dict[str, Any]
|
— |
output_schema |
dict[str, Any] | None
|
— |
CallResult
3
▼
Frozen snapshot of an MCP tools/call response.
CallResult
3
▼
Frozen snapshot of an MCP tools/call response.
Attributes
| Name | Type | Description |
|---|---|---|
text |
str
|
— |
is_error |
bool
|
— |
structured |
Any
|
— |
MCPClient
8
▼
Synchronous test client for exercising a CLI's MCP surface.
MCPClient
8
▼
Synchronous test client for exercising a CLI's MCP surface.
Methods
initialize
0
dict[str, Any]
▼
Send ``initialize`` and return the server info dict.
initialize
0
dict[str, Any]
▼
def initialize(self) -> dict[str, Any]
Returns
dict[str, Any]
list_tools
0
list[ToolInfo]
▼
Return all visible tools as ToolInfo objects.
list_tools
0
list[ToolInfo]
▼
def list_tools(self) -> list[ToolInfo]
Returns
list[ToolInfo]
call
2
CallResult
▼
Invoke a tool by name and return a CallResult.
call
2
CallResult
▼
def call(self, tool_name: str, **arguments: Any) -> CallResult
Parameters
| Name | Type | Description |
|---|---|---|
tool_name |
— |
|
**arguments |
— |
Returns
CallResult
list_resources
0
list[dict[str, Any]]
▼
Return all resources (requires F3 resources support).
list_resources
0
list[dict[str, Any]]
▼
def list_resources(self) -> list[dict[str, Any]]
Returns
list[dict[str, Any]]
read_resource
1
dict[str, Any]
▼
Read a resource by URI (requires F3 resources support).
read_resource
1
dict[str, Any]
▼
def read_resource(self, uri: str) -> dict[str, Any]
Parameters
| Name | Type | Description |
|---|---|---|
uri |
— |
Returns
dict[str, Any]
list_prompts
0
list[dict[str, Any]]
▼
Return all prompts (requires F3 prompts support).
list_prompts
0
list[dict[str, Any]]
▼
def list_prompts(self) -> list[dict[str, Any]]
Returns
list[dict[str, Any]]
get_prompt
2
dict[str, Any]
▼
Get a prompt by name (requires F3 prompts support).
get_prompt
2
dict[str, Any]
▼
def get_prompt(self, prompt_name: str, **arguments: Any) -> dict[str, Any]
Parameters
| Name | Type | Description |
|---|---|---|
prompt_name |
— |
|
**arguments |
— |
Returns
dict[str, Any]
Internal Methods 1 ▼
__init__
1
▼
__init__
1
▼
def __init__(self, cli: CLI) -> None
Parameters
| Name | Type | Description |
|---|---|---|
cli |
— |