POST
/
{tenant}
/
mcp
curl --request POST \
  --url https://api.kambrium.com/{tenant}/mcp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": "init-123",
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-03-26",
    "capabilities": {
      "roots": {
        "listChanged": true
      },
      "sampling": {}
    },
    "clientInfo": {
      "name": "my-mcp-client",
      "version": "1.0.0"
    }
  }
}'
{
  "jsonrpc": "2.0",
  "id": "tools-list-123",
  "result": {
    "tools": [
      {
        "name": "get_contacts",
        "description": "Retrieve contacts from Pipedrive CRM",
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Maximum number of contacts to return",
              "minimum": 1,
              "maximum": 100
            },
            "filter": {
              "type": "string",
              "description": "Filter contacts by name or email"
            }
          },
          "required": ["limit"]
        }
      },
      {
        "name": "create_deal",
        "description": "Create a new deal in Pipedrive",
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "description": "Deal title"
            },
            "value": {
              "type": "number",
              "description": "Deal value"
            },
            "person_id": {
              "type": "integer",
              "description": "Associated person ID"
            }
          },
          "required": ["title", "value"]
        }
      }
    ],
    "nextCursor": null
  }
}

Overview

The tools/list method returns all tools available to the authenticated user. Tools are dynamically filtered based on OAuth authentication and database permissions, ensuring users only see tools they can execute.

Prerequisites

  1. Session Initialization: Complete initializenotifications/initialized flow
  2. Authentication: Valid OAuth token or PAT with mcp.read scope
  3. Session ID: Include Mcp-Session-Id header from initialization

Request Format

{
  "jsonrpc": "2.0",
  "id": "tools-list-123",
  "method": "tools/list",
  "params": {
    "cursor": "optional_pagination_cursor"
  }
}

Request Parameters

jsonrpc
string
required

Must be "2.0" (JSON-RPC version)

id
string
required

Unique request identifier (cannot be null)

method
string
required

Must be "tools/list"

params
object

Optional parameters

Response Format

jsonrpc
string
required

Always "2.0"

id
string
required

Matches the request ID exactly

result
object
required

Tools list result

Example Responses

{
  "jsonrpc": "2.0",
  "id": "tools-list-123",
  "result": {
    "tools": [
      {
        "name": "get_contacts",
        "description": "Retrieve contacts from Pipedrive CRM",
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "description": "Maximum number of contacts to return",
              "minimum": 1,
              "maximum": 100
            },
            "filter": {
              "type": "string",
              "description": "Filter contacts by name or email"
            }
          },
          "required": ["limit"]
        }
      },
      {
        "name": "create_deal",
        "description": "Create a new deal in Pipedrive",
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "description": "Deal title"
            },
            "value": {
              "type": "number",
              "description": "Deal value"
            },
            "person_id": {
              "type": "integer",
              "description": "Associated person ID"
            }
          },
          "required": ["title", "value"]
        }
      }
    ],
    "nextCursor": null
  }
}

OAuth Filtering Behavior

Our implementation applies OAuth-based filtering:

User-Specific Tool Access

  • Database Permissions: Tools filtered based on user’s database permissions
  • OAuth Client ID: Each client gets appropriate tool subset
  • Consistent Results: Same user always gets same tools (unless permissions change)
  • Dynamic Loading: Tools loaded from database per user context

Access Control Validation

// Tools are filtered based on:
// 1. User's OAuth token client_id
// 2. Database tool permissions
// 3. Tool availability status
// 4. Server configuration

Tool Count Expectations

  • Minimum: Authenticated users get at least some tools
  • Maximum: Limited by user permissions and server configuration
  • Consistency: Tool count remains stable across requests for same user

Implementation Notes

Request ID Requirements

  • Must be unique within session
  • Cannot be null (enforced by our implementation)
  • String or number format accepted

Session Management

  • Mcp-Session-Id header required after initialization
  • Session validates OAuth token and permissions
  • Invalid session returns authentication error

Pagination Support

  • Uses cursor-based pagination
  • nextCursor provided when more results available
  • Empty cursor parameter returns first page

Error Handling

  • -32000: Authentication/session errors
  • -32600: Invalid request format
  • -32602: Invalid parameters

Performance Considerations

  • Tools cached per user session
  • Database queries optimized for user permissions
  • Results paginated for large tool sets

This endpoint provides the foundation for tool discovery, enabling clients to understand what operations are available before calling tools/call.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

Mcp-Session-Id
string

MCP session ID (required after initialization)

Example:

"session_abc123"

Path Parameters

tenant
string
required

Tenant identifier (e.g., 'pipedrive', 'salesforce', 'hubspot')

Example:

"pipedrive"

Body

application/json

Response

200
application/json

JSON-RPC 2.0 response

The response is of type object.