MCPcopy Index your code
hub / github.com/google/adk-python / _get_declaration

Method _get_declaration

src/google/adk/tools/function_tool.py:93–104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

91
92 @override
93 def _get_declaration(self) -> Optional[types.FunctionDeclaration]:
94 function_decl = types.FunctionDeclaration.model_validate(
95 build_function_declaration(
96 func=self.func,
97 # The model doesn't understand the function context.
98 # input_stream is for streaming tool
99 ignore_params=self._ignore_params,
100 variant=self._api_variant,
101 )
102 )
103
104 return function_decl
105
106 def _preprocess_args(self, args: dict[str, Any]) -> dict[str, Any]:
107 """Preprocess and convert function arguments before invocation.

Callers

nothing calls this directly

Calls 2

model_validateMethod · 0.80

Tested by

no test coverage detected