<!-- CURSOR_SUMMARY --> > [!NOTE] > **Medium Risk** > Touches multiple toolkits’ runtime entrypoints and context/error/auth plumbing, so breakage risk is mainly around invocation/packaging and tool execution wiring rather than business logic. > > **Overview** > Migrates the BrightData, ClickHouse, LinkedIn, Math, MongoDB, Postgres, and Zendesk OSS toolkits from `arcade-tdk` to `arcade-mcp-server` APIs by updating tool decorators, `Context` types, auth classes, and exception imports. > > Adds per-toolkit `__main__.py` files that construct an `MCPApp`, register module tools, and run via configurable transport/host/port; corresponding `pyproject.toml` updates bump versions, drop `arcade-tdk`/`arcade-serve` deps, and add `project.scripts` console entrypoints. > > Updates tests and eval suites to use `arcade_mcp_server.Context` (mocked) and switches eval `ToolCatalog` imports to `arcade_core`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9b3e31acb4b35e1d72efd47e2d279c5b19e3ecb0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
from typing import Annotated, Any
|
|
|
|
from arcade_mcp_server import Context, tool
|
|
from arcade_mcp_server.auth import OAuth2
|
|
from arcade_mcp_server.metadata import (
|
|
Behavior,
|
|
Classification,
|
|
Operation,
|
|
ServiceDomain,
|
|
ToolMetadata,
|
|
)
|
|
|
|
from arcade_zendesk.who_am_i_util import build_who_am_i_response
|
|
|
|
|
|
@tool(
|
|
requires_auth=OAuth2(id="zendesk", scopes=["read"]),
|
|
requires_secrets=["ZENDESK_SUBDOMAIN"],
|
|
metadata=ToolMetadata(
|
|
classification=Classification(
|
|
service_domains=[ServiceDomain.CUSTOMER_SUPPORT],
|
|
),
|
|
behavior=Behavior(
|
|
operations=[Operation.READ],
|
|
read_only=True,
|
|
destructive=False,
|
|
idempotent=True,
|
|
open_world=True,
|
|
),
|
|
),
|
|
)
|
|
async def who_am_i(
|
|
context: Context,
|
|
) -> Annotated[
|
|
dict[str, Any],
|
|
"Get comprehensive user profile and Zendesk account information.",
|
|
]:
|
|
"""
|
|
Get comprehensive user profile and Zendesk account information.
|
|
|
|
This tool provides detailed information about the authenticated user including
|
|
their name, email, role, organization details, and Zendesk account context.
|
|
"""
|
|
user_info = await build_who_am_i_response(context)
|
|
return dict(user_info)
|