Support @Schema annotation for Object parameters in FunctionTool
Los mantenedores suelen responder en 1 día
@hemasekhar-p ya está trabajando en esto.
Desde el 14/1/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Is your feature request related to a problem? Please describe.
Currently, adk-java relies on Jackson's @JsonProperty for defining schema names and required fields for pojos used as FunctionTool parameters. This creates several friction points:
- Naming Conflicts: We may want the LLM-facing parameter name (e.g.,
snake_case) to differ from the Java field name (e.g.,camelCase) without affecting internal JSON serialization used for other purposes. - Missing Metadata: Standard Jackson annotations do not support a
descriptionfield, which is critical for FunctionTool schemas. - Ambiguous Optionality: Controlling whether a field is "required" or "optional" in the generated schema is difficult to decouple from Jackson's strict deserialization rules.
Describe the solution you'd like
I would like to extend the com.google.adk.tools.Annotations.Schema annotation to act as the highest source of truth for generating the FunctionTool schema in regards to pojo parameters, and deserialization. This includes:
- Name:
@Schema(name="...")should control the property name in the generated schema and during deserialization of the LLM response. - Description:
@Schema(description="...")should populate the schema description. - Optionality:
@Schema(optional=true/false)should explicitly control whether a field is marked as required, overriding Jackson's default behavior if necessary.
Describe alternatives you've considered
- Jackson Mixins: We could use Jackson Mixins to separate the LLM view from the internal view, but this adds significant boilerplate and complexity for developers.
- Custom Annotations: I considered creating a new set of annotations, but extending the existing
@Schemaannotation seems more idiomatic for the ADK.
Additional context
The Object FunctionTool parameter doesn't seem to have a direct 1-1 equivalent in adk-python, other than an issue requesting for pydantic models to be supported as FunctionTool parameters.
The precedence rules I believe align best with the rest of the library would be :
Name: @Schema(name) > @JsonProperty(value) > Field Name
Description: @Schema(description) > None
Required: @Schema(optional) > @JsonProperty(required) > Default (Optional)
These rules should not affect the way prior objects that have been passed without the @Schema annotation are treated.
- Lenguaje dominante
- Java
- Estrellas
- 1.7k
- Forks
- 421
- Merge medio
- 3 d 14 h
- PR fusionados (30 d)
- 31
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/adk-java
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Approved tool call re-runs on every later user turn if it never got a function responsePosiblemente ocupada @hemasekhar-p la tomó hace 2 días. Abiertoneeds review
google/adk-java#1556 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
LocalSkillSource.listResources returns backslash-separated paths on WindowsPosiblemente ocupada @hemasekhar-p la tomó hace 3 días. Abiertoneeds review
google/adk-java#1541 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Context caching (ContextCacheConfig) is a silent no-op: config is plumbed to InvocationContext but never readPosiblemente ocupada @hemasekhar-p la tomó hace 4 días. Abiertoneeds review
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
google/adk-java#1530 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de google/adk-java
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
checkstyle/checkstyle#21755 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
github/copilot-sdk#2782 ·
Los mantenedores suelen responder en 1 día
-
Make docs website more visibleAbiertodocumentation Good for newcomer quick win
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CodeForPhilly/benefit-decision-toolkit#519 ·
Los mantenedores suelen responder en 1 día
-
area-deployment triage:bot-seen triage:needs-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/aspire#20533 · 1 comentario ·
Los mantenedores suelen responder en 1 día