Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Last active October 17, 2025 18:12
Show Gist options
  • Select an option

  • Save KyMidd/6e4e89cb308d42bc84b351070fef5cfd to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/6e4e89cb308d42bc84b351070fef5cfd to your computer and use it in GitHub Desktop.
Helper function to apply prefixes to MCP tools
def add_prefix_to_mcp_tools(tools, prefix):
prefix = f"{prefix}_"
return [PrefixedMCPTool(tool, prefix) for tool in tools]
# Get tools from Azure MCP -
azure_mcp_client, azure_tools = build_Azure_mcp_client(azure_client_id, azure_client_secret, azure_tenant_id)
# Apply prefix - tools like 'search' become 'azure_search'
azure_tools = add_prefix_to_mcp_tools(azure_tools, "azure")
# Add to agent's tool list
tools.extend(azure_tools)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment