en un clic
add-tool
Add a new tool to the agent toolstore registry
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Add a new tool to the agent toolstore registry
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Read-only — assemble the wider runtime picture of a deployed voice app from azd deployment artifacts and Azure Monitor (Application Insights / Log Analytics) via Azure MCP or az CLI, then render it as KQL, call timelines, latency waterfalls, and mermaid diagrams
Service catalog and guided onboarding for the azd deployment. USE WHEN the user wants to discover, install, set up, or be walked through the deployable components (Azure OpenAI/AI Foundry, Speech, ACS/telephony, Cosmos DB, Redis, Container Apps, Key Vault, App Config, CardAPI MCP), asks "what gets deployed", "what services does this use", "help me onboard", "set up the deployment", "guide me through azd up", "which components do I need", or wants to enable optional pieces (phone number, EasyAuth, data seeding). Acts as the entry point an agent hooks into to assess current state, present the catalog, and onboard each component. DO NOT USE FOR: deep azd hook/flow internals or model-availability checks (use deployment-guide); runtime failure diagnosis (use troubleshoot); telemetry/log analysis (use observability-insights).
Agent-first, read-only diagnosis of the voice pipeline (deploy, telephony, STT, LLM, TTS, state) — gather evidence via Azure MCP / azd artifacts / CLI, probe the user for missing details, and recommend fixes without changing anything
Require relevant tests and documentation updates for any code or config change, and report what was run.
Create or update evaluation scenarios for the tests/evaluation framework, including session-based scenarios and A/B comparisons
Guide azd-based deployments, including where azure.yaml and azd hook scripts live, the current deployment flow, troubleshooting docs, and regional/model availability checks for Azure OpenAI
| name | add-tool |
| description | Add a new tool to the agent toolstore registry |
Add tools to apps/artagent/backend/registries/toolstore/.
"""
Tool Module Name
================
Brief description of tools in this module.
"""
from __future__ import annotations
from typing import Any
from apps.artagent.backend.registries.toolstore.registry import register_tool
from utils.ml_logging import get_logger
logger = get_logger("agents.tools.module_name")
# ═══════════════════════════════════════════════════════════════════════════════
# SCHEMAS
# ═══════════════════════════════════════════════════════════════════════════════
tool_name_schema: dict[str, Any] = {
"name": "tool_name",
"description": "Clear description of what this tool does and when to use it.",
"parameters": {
"type": "object",
"properties": {
"param1": {"type": "string", "description": "Parameter description"},
"param2": {"type": "integer", "description": "Optional param"},
},
"required": ["param1"],
},
}
# ═══════════════════════════════════════════════════════════════════════════════
# EXECUTORS
# ═══════════════════════════════════════════════════════════════════════════════
async def tool_name(args: dict[str, Any]) -> dict[str, Any]:
"""Execute the tool with given arguments."""
param1 = (args.get("param1") or "").strip()
if not param1:
return {"success": False, "message": "param1 is required."}
# Tool implementation
logger.info("Tool executed: %s", param1)
return {
"success": True,
"result": "Tool output",
}
# ═══════════════════════════════════════════════════════════════════════════════
# REGISTRATION
# ═══════════════════════════════════════════════════════════════════════════════
register_tool(
"tool_name",
tool_name_schema,
tool_name,
tags={"category1", "category2"},
)
registries/toolstore/args: dict[str, Any]register_tool() at module levelregistry.py initialize_tools() functiontools: list in their agent.yamlregister_tool(
name="tool_name", # Unique identifier
schema=tool_name_schema, # OpenAI function schema
executor=tool_name, # Async function
is_handoff=False, # True if triggers agent transfer
tags={"category"}, # Optional categorization
override=False, # Allow re-registration
)
For agent transfer tools, use is_handoff=True:
handoff_specialist_schema = {
"name": "handoff_specialist",
"description": "Transfer to specialist agent for [reason].",
"parameters": {
"type": "object",
"properties": {
"reason": {"type": "string", "description": "Why transferring"},
"context": {"type": "string", "description": "Relevant context"},
},
"required": ["reason"],
},
}
async def handoff_specialist(args: dict[str, Any]) -> dict[str, Any]:
return {
"success": True,
"handoff": True,
"target_agent": "specialist",
"reason": args.get("reason", ""),
}
register_tool(
"handoff_specialist",
handoff_specialist_schema,
handoff_specialist,
is_handoff=True,
tags={"handoff"},
)
Always return dict with:
success: bool - Whether operation succeededmessage: str - Error message if failedapps/artagent/backend/registries/toolstore/registry.py
Key functions:
register_tool() - Register a toolget_tools_for_agent(tool_names) - Get schemas for agentexecute_tool(name, args) - Execute a toolinitialize_tools() - Load all tool modules