McpClientService
Facade over a {@see ToolRegistry} that shapes it for {@see AgentOrchestrator}: summaries for the LLM's tool list and context-aware invocation.
McpClientService::__construct()
public function __construct(Milpa\ToolRuntime\ToolRegistry $internalRegistry):Parameters
| Name | Type | Description |
|---|---|---|
| $internalRegistry | Milpa\ToolRuntime\ToolRegistry |
McpClientService::setContext()
public function setContext(Milpa\ToolRuntime\Contracts\ToolContext $context): voidSet the execution context for tool calls. This should be called before processing a request to set the user's identity and scopes.
Parameters
| Name | Type | Description |
|---|---|---|
| $context | Milpa\ToolRuntime\Contracts\ToolContext |
McpClientService::getContext()
public function getContext(): ?Milpa\ToolRuntime\Contracts\ToolContextGet the current context.
McpClientService::getToolSummaries()
public function getToolSummaries(): arrayGet the plain-array tool summaries for LLM/MCP exposure. Delegates to {@see ToolRegistry::getToolSummaries()} — named to match that vocabulary since tool-runtime 0.2 (was `getTools()` through 0.1). In the future, merge with external tools fetched via HTTP/SSE.
McpClientService::callTool()
public function callTool(string $name, array $args): ?mixedExecute a tool by name through the underlying registry pipeline.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $args | array<string, mixed> |