{"record":{"id":"b4b3bcba7124da94","repo":"microsoft/semantic-kernel","slug":"azure-function-tools-are-not-yet-supported-with-th","errorCode":null,"errorMessage":"Azure Function tools are not yet supported with the Azure AI Agent Declarative Spec.","messagePattern":"Azure Function tools are not yet supported with the Azure AI Agent Declarative Spec\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"python/semantic_kernel/agents/azure_ai/azure_ai_agent.py","lineNumber":139,"sourceCode":"    filter_expr = opts.get(\"filter\", \"\")\n\n    top_k = opts.get(\"top_k\", 5)\n    if not isinstance(top_k, int):\n        raise AgentInitializationException(f\"'top_k' must be an integer in: {spec}\")\n\n    return AzureAISearchTool(\n        index_connection_id=conn_id,\n        index_name=index_name,\n        query_type=query_type,\n        filter=filter_expr,\n        top_k=top_k,\n    )\n\n\n@_register_tool(\"azure_function\")\ndef _azure_function(spec: ToolSpec) -> ToolDefinition:\n    # TODO(evmattso): Implement Azure Function tool support\n    raise NotImplementedError(\"Azure Function tools are not yet supported with the Azure AI Agent Declarative Spec.\")\n\n\n@_register_tool(\"bing_grounding\")\ndef _bing_grounding(spec: ToolSpec) -> BingGroundingTool:\n    opts = spec.options or {}\n\n    connections = spec.options.get(\"tool_connections\")\n    if not connections or not isinstance(connections, list) or not connections[0]:\n        raise AgentInitializationException(f\"Missing or malformed 'tool_connections' in: {spec}\")\n    conn_id = connections[0]\n\n    market = opts.get(\"market\", \"\")\n    set_lang = opts.get(\"set_lang\", \"\")\n    count = opts.get(\"count\", 5)\n    if not isinstance(count, int):\n        raise AgentInitializationException(f\"'count' must be an integer in: {spec}\")\n    freshness = opts.get(\"freshness\", \"\")\n","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/agents/azure_ai/azure_ai_agent.py#L121-L157","documentation":"Raised as NotImplementedError when a declarative spec references a tool of type azure_function. Azure Function tool binding for the Azure AI Agent Declarative Spec is not yet implemented (tracked TODO evmattso).","triggerScenarios":"Including a tool entry with type: azure_function in the declarative agent spec.","commonSituations":"Developer follows Azure docs that mention Azure Function tools and assumes SDK support; copies a spec from a roadmap or preview sample.","solutions":["Remove the azure_function tool from the declarative spec until the feature ships.","Use a kernel function tool (type: function) that calls the Azure Function via the Functions client as a workaround.","Track the SDK changelog for Azure Function tool support in the declarative spec builder."],"exampleFix":"// before\ntools:\n  - type: azure_function\n    options: {...}\n\n// after\n# remove it, or wrap the function call in a kernel function\ntools:\n  - type: function\n    id: MyPlugin-CallAzureFunc","handlingStrategy":"try-catch","validationCode":"SUPPORTED_TOOL_TYPES = {\"azure_ai_search\", \"bing_grounding\", \"code_interpreter\", \"file_search\", \"function\", \"openapi\"}\n\ndef filter_unsupported(tools: list[dict]) -> list[dict]:\n    return [t for t in tools if t.get(\"type\") in SUPPORTED_TOOL_TYPES]","typeGuard":"def is_supported_tool_type(t: str) -> bool:\n    return t in {\"azure_ai_search\", \"bing_grounding\", \"code_interpreter\", \"file_search\", \"function\", \"openapi\"}","tryCatchPattern":"try:\n    agent = AzureAIAgent.from_yaml(spec)\nexcept NotImplementedError as e:\n    if \"azure_function\" in str(e):\n        spec = strip_tool_type(spec, \"azure_function\")\n        agent = AzureAIAgent.from_yaml(spec)\n    raise","preventionTips":["Strip azure_function tool entries before passing specs until the SDK ships support.","Subscribe to the SDK release notes for Azure Function declarative tool support."],"tags":["azure-ai-agent","declarative-spec","azure-function","not-implemented"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}