gemini-function-calling
Skill2 starsChanged 28 days agoApache-2.0View on GitHub
Designs, validates, and tests production Gemini function calling schemas, structured outputs with Pydantic/JSON Schema, parallel tool dispatch, and error recovery loops.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- FutureAtoms/claude-skills-backuptheir own version, first seen Mar 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- FutureAtoms/claude-skills-backup★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository108 other files it gives its agents.
- AGENTS.mdAGENTS.md
- everything-gemini-maintainerSkill
- adversarial-fuzz-generatorSkill
- agent-evalsSkill
- ai-first-engineeringSkill
- alloydb-omni-vectorSkill
- apache-kafka-streamsSkill
- api-craftsmanSkill
- architecture-designerSkill
- argon-3d-game-engineSkill
- argon-3d-scene-architectSkill
- argon-procedural-asset-generatorSkill
- argon-visual-critique-loopSkill
- argo-workflowsSkill
- autonomous-incident-healerSkill
- axum-web-serviceSkill
- bigquery-vector-searchSkill
- browser-qa-testerSkill
- chromadb-vector-storeSkill
- cilium-ebpf-networkingSkill
- clickhouse-analyticsSkill
- cloud-deploy-canarySkill
- cloudflare-r2-object-storageSkill
- cloudflare-workersSkill
- cloud-run-agentsSkill
- context-cachingSkill
- context-distillation-compressorSkill
- context-warmerSkill
- continuous-learningSkill
- cost-oracle-finopsSkill
- cross-repo-swarm-syncSkill
- cve-remediation-orchestratorSkill
- database-architectSkill
- dataproc-spark-analyticsSkill
- dbt-transformationSkill
- debezium-cdcSkill
- devops-pipelineSkill
- distributed-rate-limitingSkill
- docker-compose-orchestratorSkill
- duckdb-local-olapSkill
- dynamic-thinking-allocationSkill
- ebpf-microvm-sandboxSkill
- ebpf-sandbox-enforcerSkill
- elephant-goldfish-modelSkill
- envoy-ai-gatewaySkill
- ephemeral-swarm-orchestratorSkill
- fastapi-productionSkill
- fullstack-nextjsSkill
- game-audio-synthesizerSkill
- game-studioSkill
- gemini-groundingSkill
- gemini-live-audio-transcriberSkill
- gemini-live-multimodalSkill
- gemini-live-screen-visionSkill
- gemini-multimodalSkill
- genetic-prompt-cross-pollinatorSkill
- git-craftsmanSkill
- github-opsSkill
- google-axSkill
- google-flow-orchestratorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
When an application requires guaranteed JSON outputs matching a domain model, configure response_mime_type="application/json" and supply a …
- Distinctive: line 71
When a tool execution fails (e.g., database timeout or syntax error):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Gemini Function Calling & Structured Outputs
Overview
Gemini models support native, high-precision function calling and constrained JSON output schemas. This skill outlines best practices for defining deterministic tool declarations, handling parallel tool invocations, enforcing response schemas, and recovering gracefully from tool execution exceptions.
Core Capabilities
1. Function Declarations (Tools)
Define tools with clear semantics, parameter types, descriptions, and required constraints:
from google.genai import types
def get_db_schema_declaration() -> types.FunctionDeclaration:
return types.FunctionDeclaration(
name="query_database",
description="Executes a read-only SQL query against the application replica.",
parameters=types.Schema(
type=types.Type.OBJECT,
properties={
"query": types.Schema(
type=types.Type.STRING,
description="The SQL query to execute. Must be a SELECT statement."
),
"limit": types.Schema(
type=types.Type.INTEGER,
description="Maximum number of rows to return (default: 50, max: 200)."
)
},
required=["query"]
)
)2. Structured JSON Outputs (response_schema)
When an application requires guaranteed JSON outputs matching a domain model, configure response_mime_type="application/json" and supply a response_schema (or Pydantic class):
from pydantic import BaseModel, Field
class CodeAnalysisReport(BaseModel):
summary: str = Field(description="High-level architecture assessment")
vulnerabilities: list[str] = Field(description="List of identified security vulnerabilities")
risk_score: int = Field(description="Risk rating from 1 (lowest) to 10 (critical)", ge=1, le=10)
config = types.GenerateContentConfig(
response_mime_type="application/json",
response_schema=CodeAnalysisReport,
temperature=0.1
)3. Parallel & Multi-Turn Function Calling
- Parallel Dispatch: Gemini can return multiple function calls in a single response turn. Process independent read operations concurrently using
asyncio.gatherorPromise.all. - Function Response Envelope: Return the results of each tool back to the model with matching tool names and execution status:
tool_response_part = types.Part.from_function_response(
name="query_database",
response={"status": "success", "rows": rows, "count": len(rows)}
)4. Error Recovery & Defensive Handling
When a tool execution fails (e.g., database timeout or syntax error):
- Never suppress the error silently: Feed the error back to Gemini in the function response envelope.
- Include Contextual Remediation: Inform the model why the call failed so it can self-correct in the next turn:
error_part = types.Part.from_function_response(
name="query_database",
response={
"status": "error",
"error_code": "SYNTAX_ERROR",
"message": "Column 'user_id' does not exist in table 'accounts'. Available columns: [id, account_number, balance]."
}
)Verification Checklist
- Tool parameters have unambiguous
descriptionfields requiredfields explicitly defined- Read-only vs destructive operations strictly separated
- Tool execution errors safely fed back to model for autonomous self-correction
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

