Skip to content
Weavz
Menu

MCP Tool Mode

Set up MCP servers in Tool Mode to expose integration actions as individual tools for AI agents.

Tool Mode MCP servers expose each integration action as an individual tool. AI agents like Claude, Cursor, and others see every action as a separate callable tool with its own typed input schema.

Create an MCP Server

Every new MCP Workspace includes an endpoint in Tool Mode by default. You can also explicitly set Tool Mode on an existing workspace:

typescript
const { workspace } = await client.mcpWorkspaces.create({ name: 'Support tools' })
const { server, mcpEndpoint } = await client.mcpWorkspaces.configureMcp(workspace.id, { mode: 'TOOLS' })
python
workspace = client.mcp_workspaces.create(name="Support tools")["workspace"]
result = client.mcp_workspaces.configure_mcp(workspace["id"], mode="TOOLS")
server_id = result["server"]["id"]
endpoint = result["mcpEndpoint"]

From REST, create with POST /api/v1/workspaces, then send PATCH /api/v1/mcp/servers/{id} using the returned workspace.mcpServer.id. In the dashboard, open Advanced → MCP Workspaces, select your workspace and open Connect your AI to choose Tool Mode. Owners and admins can save the setting. The endpoint URL stays the same; refresh tools in your client afterward. Mode changes affect clients using this endpoint. Create another MCP Workspace if you need both modes with separate tool surfaces.

Add Tools

Tool Mode servers sync tools from the workspace integrations attached to the server's workspace. Add or update workspace integrations first; their alias, connection strategy, enabled actions, and partial defaults determine the normal tool surface. Each synced tool maps to one enabled integration action.

Manual tool creation is available for server-specific overrides, such as exposing one extra action only on a particular MCP server.

1

Open your MCP server

Go to Advanced → MCP Workspaces, select your workspace, and open its Connect your AI tab. Detailed server and tool controls are under Advanced access and compatibility.

2

Check synced tools

Confirm that the workspace integrations you added are visible as tools on the server.

3

Adjust workspace integrations

If a tool is missing or using the wrong account, update the workspace integration alias, connection strategy, connection, or enabled actions.

4

Add manual overrides only when needed

Use manual tools when this server needs a smaller or different surface than the workspace default.

Manual MCP tool registration is still available through POST /api/v1/mcp/servers/:id/tools when one server needs an override that should not affect the workspace. Use workspace integrations for the normal path so API calls, SDK calls, Playground, and MCP all share the same aliases, connection strategy, enabled actions, partials, and built-in settings.

Tool Naming Convention

Tools are automatically named using the pattern {toolSafeIntegrationAlias}__{actionName}. The alias is the configured workspace integration name; the app slug remains visible in the tool description so odd aliases are still searchable by app. Hyphens and other non-identifier characters are normalized to underscores:

AliasAppActionTool Name
office_slackSlack (slack)send_channel_messageoffice_slack__send_channel_message
support_githubGitHub (github)create_issuesupport_github__create_issue
finance_sheetsGoogle Sheets (google-sheets)read_sheetfinance_sheets__read_sheet

You can register the same integration multiple times under different aliases (for example office_slack, support_slack_bot, or customer_slack), each with its own connection. See the Integration Aliases guide.

MCP Helper Tools

For actions with select inputs — like selecting a Slack channel or a GitHub repo — Weavz auto-generates companion tools that let AI agents discover valid values at runtime.

Helper ToolPurpose
office_slack__send_channel_message__list_channelsList available Slack channels
support_github__create_issue__list_reposList available GitHub repositories
finance_sheets__read_sheet__list_spreadsheetsList available spreadsheets

Helper tools are created automatically whenever you add a tool that has dropdown inputs. The AI agent calls them to resolve IDs before executing the main action.

Connect an AI Client

Use the MCP endpoint from the server creation step. OAuth-capable MCP clients can connect with just the endpoint; Weavz handles sign-in and token issuance. If you created a bearer-enabled server, add either an end-user bearer token or a static bearer header as shown below.

In Claude, add a custom connector and paste the MCP endpoint:

text
https://platform.weavz.io/mcp/srv_550e8400-e29b-41d4-a716-446655440000

Only use static bearer for service-style clients that cannot complete MCP OAuth. Create or update the server with authMode: "bearer" or authMode: "oauth_and_bearer", then pass the returned mcp_ token:

json
{
  "mcpServers": {
    "weavz": {
      "type": "http",
      "url": "https://platform.weavz.io/mcp/srv_550e8400-e29b-41d4-a716-446655440000",
      "headers": {
        "Authorization": "Bearer mcp_your_static_token"
      }
    }
  }
}

For provisioned clients, create a bearer-enabled server and issue one token per end user. The bearer-token request body is:

json
{
  "endUserId": "user_123",
  "scopes": ["mcp:tools"]
}

Use the returned bearerToken as the Authorization: Bearer mcp_... header.

Bearer-token scopes default to ["mcp:tools"] for TOOLS servers. expiresIn defaults to 30 days and can be set from 5 minutes to 90 days. See Create MCP bearer token.

Managing Tools

json
{
  "description": "Send a message to a Slack channel",
  "inputDefaults": { "channel": "C01ABCDEF" }
}

Manual MCP tools also accept partialIds for server-specific presets. See Add Tool and Update Tool for the complete fields.

Delete a tool with DELETE /api/v1/mcp/servers/:id/tools/:toolId. See Delete Tool for the full request examples.

If a token is compromised, regenerate it and update your AI client config:

Regenerate with POST /api/v1/mcp/servers/:id/regenerate-token. This only works for servers whose authMode enables static bearer auth. See Regenerate token for the full request examples.

End-User MCP Servers

MCP OAuth is the preferred way to resolve per-user integrations when the AI client can complete sign-in: the AI client signs in as the actual user, and all tool calls use that user's connected accounts. For provisioned clients that cannot run OAuth, create a bearer-enabled server and issue one mcp_ bearer token per end user.

You can control who may complete MCP OAuth with endUserAccess:

  • restricted — only pre-existing workspace end users can authorize. Weavz matches the signed-in user by linked account or email and links the record when needed.
  • open — any signed-in user can authorize the server; Weavz creates or links their workspace end-user record.

For fully programmatic provisioning on a bearer-enabled server, create an end-user bearer token for an existing end user:

bash
curl -X POST https://platform.weavz.io/api/v1/mcp/servers/550e8400-e29b-41d4-a716-446655440000/access-tokens \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "endUserId": "user_123"
  }'

When a tool call fails because the end user hasn't connected the required integration, the error includes a setup URL. Share this URL with the end user — they open it, connect their account, and the agent can retry the tool call.

If a Human Gates policy matches a tool call, the MCP result includes structuredContent.view: "approval_required" and a formatted approval link when the policy allows end-user links. Approve it from the Weavz review view or approvals API, then retry the same tool call with the same arguments. See Human Gates.

When to Use TOOLS Mode

Tool Mode works best when:

  • You need a small number of focused tools (under 20)
  • Each tool should be independently callable by the AI agent
  • You want simple setup without code generation
  • Your AI agent benefits from seeing all available tools at once

For scenarios with many integrations or where context efficiency matters, consider Code Mode instead.