MCP Gemini Server

by bsmi021
Verified

gemini_functionCall

Facilitates function calling with Google Gemini models by accepting function declarations and returning text responses or function call requests based on the prompt. Does not execute functions directly.

Instructions

Generates content using a specified Google Gemini model, enabling the model to request execution of predefined functions. This tool accepts function declarations and returns either the standard text response OR the details of a function call requested by the model. NOTE: This tool only returns the request for a function call; it does not execute the function itself.

Input Schema

NameRequiredDescriptionDefault
functionDeclarationsYesRequired. An array of function declarations (schemas) that the model can choose to call based on the prompt.
generationConfigNoOptional configuration for controlling the generation process.
modelNameNoOptional. The name of the Gemini model to use (e.g., 'gemini-1.5-flash'). If omitted, the server's default model (from GOOGLE_GEMINI_MODEL env var) will be used.
promptYesRequired. The text prompt to send to the Gemini model.
safetySettingsNo
toolConfigNoOptional configuration for tools, specifically function calling.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "functionDeclarations": { "description": "Required. An array of function declarations (schemas) that the model can choose to call based on the prompt.", "items": { "additionalProperties": false, "description": "Declaration of a single function that the Gemini model can request to call.", "properties": { "description": { "description": "A description of what the function does. Used by the model to decide when to call it.", "minLength": 1, "type": "string" }, "name": { "description": "The name of the function to be called. Must match the name the model is expected to use.", "minLength": 1, "type": "string" }, "parameters": { "additionalProperties": false, "description": "Schema defining the parameters the function accepts. Must be of type OBJECT.", "properties": { "properties": { "additionalProperties": { "additionalProperties": false, "description": "Schema defining a single parameter for a function declaration, potentially recursive.", "properties": { "description": { "description": "Description of the parameter's purpose.", "type": "string" }, "enum": { "description": "Allowed string values for an ENUM-like parameter.", "items": { "type": "string" }, "type": "array" }, "items": { "$ref": "#/properties/functionDeclarations/items/properties/parameters/properties/properties/additionalProperties", "description": "Defines the schema for items if the parameter type is ARRAY." }, "properties": { "additionalProperties": { "$ref": "#/properties/functionDeclarations/items/properties/parameters/properties/properties/additionalProperties" }, "type": "object" }, "required": { "description": "List of required property names for OBJECT types.", "items": { "type": "string" }, "type": "array" }, "type": { "description": "The data type of the function parameter.", "enum": [ "OBJECT", "STRING", "NUMBER", "BOOLEAN", "ARRAY", "INTEGER" ], "type": "string" } }, "required": [ "type" ], "type": "object" }, "description": "Defines the parameters the function accepts.", "type": "object" }, "required": { "description": "List of required parameter names at the top level.", "items": { "type": "string" }, "type": "array" }, "type": { "const": "OBJECT", "description": "The top-level parameters structure must be an OBJECT.", "type": "string" } }, "required": [ "type", "properties" ], "type": "object" } }, "required": [ "name", "description", "parameters" ], "type": "object" }, "minItems": 1, "type": "array" }, "generationConfig": { "additionalProperties": false, "description": "Optional configuration for controlling the generation process.", "properties": { "maxOutputTokens": { "description": "Maximum number of tokens to generate in the response.", "minimum": 1, "type": "integer" }, "stopSequences": { "description": "Sequences where the API will stop generating further tokens.", "items": { "type": "string" }, "type": "array" }, "temperature": { "description": "Controls randomness. Lower values (~0.2) make output more deterministic, higher values (~0.8) make it more creative. Default varies by model.", "maximum": 1, "minimum": 0, "type": "number" }, "topK": { "description": "Top-k sampling parameter. The model considers the k most probable tokens. Default varies by model.", "minimum": 1, "type": "integer" }, "topP": { "description": "Nucleus sampling parameter. The model considers only tokens with probability mass summing to this value. Default varies by model.", "maximum": 1, "minimum": 0, "type": "number" } }, "type": "object" }, "modelName": { "description": "Optional. The name of the Gemini model to use (e.g., 'gemini-1.5-flash'). If omitted, the server's default model (from GOOGLE_GEMINI_MODEL env var) will be used.", "minLength": 1, "type": "string" }, "prompt": { "description": "Required. The text prompt to send to the Gemini model.", "minLength": 1, "type": "string" }, "safetySettings": { "items": { "additionalProperties": false, "description": "Setting for controlling content safety for a specific harm category.", "properties": { "category": { "description": "Category of harmful content to apply safety settings for.", "enum": [ "HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_SEXUALLY_EXPLICIT", "HARM_CATEGORY_HARASSMENT", "HARM_CATEGORY_DANGEROUS_CONTENT" ], "type": "string" }, "threshold": { "description": "Threshold for blocking harmful content. Higher thresholds block more content.", "enum": [ "HARM_BLOCK_THRESHOLD_UNSPECIFIED", "BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", "BLOCK_NONE" ], "type": "string" } }, "required": [ "category", "threshold" ], "type": "object" }, "type": "array" }, "toolConfig": { "additionalProperties": false, "description": "Optional configuration for tools, specifically function calling.", "properties": { "functionCallingConfig": { "additionalProperties": false, "description": "Configuration specific to function calling.", "properties": { "allowedFunctionNames": { "description": "Optional list of function names allowed to be called. If specified, the model will only call functions from this list.", "items": { "type": "string" }, "type": "array" }, "mode": { "description": "The function calling mode.", "enum": [ "AUTO", "ANY", "NONE" ], "type": "string" } }, "type": "object" } }, "type": "object" } }, "required": [ "prompt", "functionDeclarations" ], "type": "object" }
ID: fakxcprcnk