MCPcopy Create free account
hub / github.com/AI45Lab/Code / build_tools

Function build_tools

core/src/llm/structured.rs:975–989  ·  view source on GitHub ↗
(req: &StructuredRequest, mode: StructuredMode)

Source from the content-addressed store, hash-verified

973}
974
975fn build_tools(req: &StructuredRequest, mode: StructuredMode) -> Vec<ToolDefinition> {
976 match mode {
977 StructuredMode::Tool => {
978 vec![ToolDefinition {
979 name: format!("emit_{}", req.schema_name),
980 description: req
981 .schema_description
982 .clone()
983 .unwrap_or_else(|| format!("Emit a structured {} object", req.schema_name)),
984 parameters: req.schema.clone(),
985 }]
986 }
987 _ => vec![],
988 }
989}
990
991/// Outcome of mining a response for the structured object across all candidate sources.
992struct StructuredResolution {

Callers 2

generate_blockingFunction · 0.85
generate_streamingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected