{"record":{"id":"be6f5ce6e7cd32ef","repo":"microsoft/semantic-kernel","slug":"the-following-function-tool-s-are-defined-on-the","errorCode":null,"errorMessage":"The following function tool(s) are defined on the agent but missing from the kernel: {sorted(missing_functions)}. Please ensure all required tools are registered with the kernel.","messagePattern":"The following function tool\\(s\\) are defined on the agent but missing from the kernel: (.+?)\\. Please ensure all required tools are registered with the kernel\\.","errorType":"validation","errorClass":"AgentInvokeException","httpStatus":null,"severity":"error","filePath":"python/semantic_kernel/agents/azure_ai/agent_thread_actions.py","lineNumber":1082,"sourceCode":"        for tool in tools:\n            if isinstance(tool, FunctionToolDefinition):\n                agent_tool_func_name = getattr(tool.function, \"name\", None)\n                if agent_tool_func_name:\n                    function_tool_names.add(agent_tool_func_name)\n\n        kernel_function_names = set()\n        for f in funcs:\n            kernel_func_name = (\n                f.fully_qualified_name\n                if isinstance(f, KernelFunctionMetadata)\n                else getattr(f, \"full_qualified_name\", None)\n            )\n            if kernel_func_name:\n                kernel_function_names.add(kernel_func_name)\n\n        missing_functions = function_tool_names - kernel_function_names\n        if missing_functions:\n            raise AgentInvokeException(\n                f\"The following function tool(s) are defined on the agent but missing from the kernel: \"\n                f\"{sorted(missing_functions)}. \"\n                f\"Please ensure all required tools are registered with the kernel.\"\n            )\n\n    @classmethod\n    async def _poll_run_status(\n        cls: type[_T], agent: \"AzureAIAgent\", run: ThreadRun, thread_id: str, polling_options: RunPollingOptions\n    ) -> ThreadRun:\n        \"\"\"Poll the run status.\"\"\"\n        logger.info(f\"Polling run status: {run.id}, threadId: {thread_id}\")\n        try:\n            run = await asyncio.wait_for(\n                cls._poll_loop(agent=agent, run=run, thread_id=thread_id, polling_options=polling_options),\n                timeout=polling_options.run_polling_timeout.total_seconds(),\n            )\n        except asyncio.TimeoutError:\n            timeout_duration = polling_options.run_polling_timeout","sourceCodeStart":1064,"sourceCodeEnd":1100,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/agents/azure_ai/agent_thread_actions.py#L1064-L1100","documentation":"Raised before dispatch when the agent declares function tools (by fully-qualified name) that are not registered on the Kernel. The Azure service will reject tool calls for unknown functions, so this is caught eagerly client-side.","triggerScenarios":"Registering a plugin set on the Kernel that omits a function the agent spec references, or mistyping a plugin.function name in the agent's tool list so it does not match any KernelFunctionMetadata.fully_qualified_name.","commonSituations":"Developer loads plugins conditionally and forgets one; renames a plugin/method but does not update the agent's declarative spec; merges a spec from another environment with different plugins.","solutions":["Register the missing plugin(s)/function(s) on the Kernel so each fully_qualified_name in the error's sorted list exists.","Fix the name in the agent spec or tool override to match the kernel's fully_qualified_name (format: PluginName-FunctionName or PluginName.FunctionName).","If a tool is intentionally unavailable, remove it from the agent's tool list."],"exampleFix":"// before\nkernel.add_plugin(MyPlugin(), \"Search\")\n# agent spec references \"Search-Lookup\" but kernel only has \"Search-Query\"\n\n// after\n# either add the missing function\nkernel.add_plugin(MyPlugin(), \"Search\")  # ensure Lookup exists\n# or fix the spec name\nagent_tools = [{\"type\": \"function\", \"id\": \"Search-Query\"}]","handlingStrategy":"validation","validationCode":"def ensure_tools_registered(kernel, tool_names: set[str]) -> None:\n    registered = {f.fully_qualified_name for f in kernel.get_list_of_function_metadata_filters({})}\n    missing = tool_names - registered\n    if missing:\n        raise ValueError(f\"Register these on the kernel first: {sorted(missing)}\")","typeGuard":"def all_tools_in_kernel(kernel, tool_names: set[str]) -> bool:\n    registered = {f.fully_qualified_name for f in kernel.get_list_of_function_metadata_filters({})}\n    return tool_names.issubset(registered)","tryCatchPattern":null,"preventionTips":["Assert all referenced tool fully_qualified_names exist on the Kernel in a startup check.","Use a single plugin registration routine so no plugin is silently omitted."],"tags":["azure-ai-agent","kernel","tools","registration"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}