Google Gemini · Schema

Tool

Tool details that the model may use to generate response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.

Agentic AIArtificial IntelligenceCode GenerationEmbeddingsGenerative AIImage GenerationLLMMachine LearningMultimodal

Properties

Name Type Description
functionDeclarations array A list of FunctionDeclarations available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a Functi
codeExecution object Enables the model to execute code as part of generation. Code execution is enabled by passing an empty object.
View JSON Schema on GitHub

JSON Schema

google-gemini-tool-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Tool",
  "title": "Tool",
  "type": "object",
  "description": "Tool details that the model may use to generate response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.",
  "properties": {
    "functionDeclarations": {
      "type": "array",
      "description": "A list of FunctionDeclarations available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution.",
      "items": {
        "$ref": "#/components/schemas/FunctionDeclaration"
      }
    },
    "codeExecution": {
      "type": "object",
      "description": "Enables the model to execute code as part of generation. Code execution is enabled by passing an empty object."
    }
  }
}