MCPcopy Index your code
hub / github.com/InfinitiBit/graphbit / execute_single_tool_internal

Method execute_single_tool_internal

python/src/tools/executor.rs:490–507  ·  view source on GitHub ↗

Execute a single tool call (internal method)

(
        &self,
        tool_call: LlmToolCall,
        py: Python<'_>,
    )

Source from the content-addressed store, hash-verified

488impl ToolExecutor {
489 /// Execute a single tool call (internal method)
490 fn execute_single_tool_internal(
491 &self,
492 tool_call: LlmToolCall,
493 py: Python<'_>,
494 ) -> PyResult<ToolResult> {
495 let registry = self.registry.lock().map_err(|e| {
496 PyErr::new::<pyo3::exceptions::PyRuntimeError, _>(format!(
497 "Failed to acquire registry lock: {}",
498 e
499 ))
500 })?;
501
502 // Convert parameters to PyDict
503 let params = self.json_to_pydict(&tool_call.parameters, py)?;
504
505 // Execute the tool
506 registry.execute_tool(&tool_call.name, &params, py)
507 }
508 /// Validate execution configuration
509 fn validate_config(&self) -> Result<(), ToolExecutionError> {
510 if self.config.max_execution_time_ms == 0 {

Callers 1

execute_toolsMethod · 0.80

Calls 2

json_to_pydictMethod · 0.80
execute_toolMethod · 0.80

Tested by

no test coverage detected