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

Method validate_config

python/src/tools/executor.rs:509–523  ·  view source on GitHub ↗

Validate execution configuration

(&self)

Source from the content-addressed store, hash-verified

507 }
508 /// Validate execution configuration
509 fn validate_config(&self) -> Result<(), ToolExecutionError> {
510 if self.config.max_execution_time_ms == 0 {
511 return Err(ToolExecutionError::ValidationError(
512 "Max execution time must be greater than 0".to_string(),
513 ));
514 }
515
516 if self.config.max_tool_calls == 0 {
517 return Err(ToolExecutionError::ValidationError(
518 "Max tool calls must be greater than 0".to_string(),
519 ));
520 }
521
522 Ok(())
523 }
524
525 /// Validate tool call parameters
526 fn validate_tool_call(&self, tool_call: &LlmToolCall) -> Result<(), ToolExecutionError> {

Callers 1

execute_toolsMethod · 0.45

Calls 2

ValidationErrorClass · 0.85
to_stringMethod · 0.80

Tested by

no test coverage detected