Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Mistralai Client python Tool Schema Definition

From Leeroopedia
Knowledge Sources
Domains Function_Calling, API_Design
Last Updated 2026-02-15 14:00 GMT

Overview

A schema declaration pattern that defines callable tool functions with typed parameter specifications using JSON Schema, enabling language models to invoke external capabilities.

Description

Tool Schema Definition is the process of declaring function signatures and parameter schemas that a language model can invoke during generation. Each tool has a name, description (so the model understands when to use it), and a parameters object that follows JSON Schema format. The model uses these schemas to decide which function to call and how to populate its arguments. This enables language models to access external data, perform calculations, or interact with APIs beyond their training data.

Usage

Use this principle when you want the language model to call external functions — such as database lookups, API calls, calculations, or any external capability. Define one Tool for each function the model should have access to.

Theoretical Basis

Tool definitions follow the JSON Schema standard for parameter typing:

  • Each tool has a name (identifier for dispatch) and description (natural language for the model)
  • parameters is a JSON Schema object defining argument types, required fields, and descriptions
  • The model evaluates tool schemas against the user's request to decide if/which tool to call
  • tool_choice parameter controls whether tool use is "auto" (model decides), "any" (must use a tool), or "none" (no tools)

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment