{
  "openapi": "3.1.0",
  "info": {
    "title": "LinkedIn Ads MCP Server",
    "description": "LinkedIn Marketing API v202602 for B2B advertising",
    "version": "1.0.0",
    "contact": {
      "name": "Hopkin",
      "url": "https://hopkin.ai"
    }
  },
  "servers": [
    {
      "url": "https://linkedin.mcp.hopkin.ai",
      "description": "Production MCP endpoint"
    }
  ],
  "paths": {
    "/tools": {
      "get": {
        "operationId": "listTools",
        "summary": "List available tools",
        "description": "Returns all tools registered on this server with their names, descriptions, and input schemas.",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "Tool list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_get_account_summary": {
      "post": {
        "operationId": "linkedin_ads_get_account_summary",
        "summary": "Get LinkedIn Account Summary",
        "description": "Get a high-level performance summary for a LinkedIn Ads account including spend, impressions, clicks, conversions, leads, and conversion breakdown. Conversion data may be delayed 24-72 hours.",
        "tags": [
          "account-summary"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Ad account ID (numeric, without URN prefix)."
                  },
                  "date_preset": {
                    "type": "string",
                    "enum": [
                      "LAST_7_DAYS",
                      "LAST_14_DAYS",
                      "LAST_30_DAYS",
                      "THIS_MONTH",
                      "LAST_MONTH",
                      "LAST_90_DAYS"
                    ],
                    "default": "LAST_30_DAYS"
                  },
                  "start_date": {
                    "type": "string"
                  },
                  "end_date": {
                    "type": "string"
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "account_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "last-30-days": {
                  "summary": "Last 30 days",
                  "value": {
                    "account_id": "123456789",
                    "date_preset": "LAST_30_DAYS",
                    "reason": "User wants an account overview"
                  }
                },
                "this-month": {
                  "summary": "This month",
                  "value": {
                    "account_id": "123456789",
                    "date_preset": "THIS_MONTH",
                    "reason": "Monthly performance summary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_list_ad_accounts": {
      "post": {
        "operationId": "linkedin_ads_list_ad_accounts",
        "summary": "List LinkedIn Ad Accounts",
        "description": "List LinkedIn Sponsored Ad Accounts accessible to the authenticated user.",
        "tags": [
          "ad-accounts"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "DRAFT",
                        "CANCELED",
                        "PENDING_DELETION",
                        "REMOVED"
                      ]
                    },
                    "description": "Filter by account status. Defaults to [ACTIVE]."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "BUSINESS",
                      "ENTERPRISE"
                    ],
                    "description": "Filter by account type."
                  },
                  "include_test_accounts": {
                    "type": "boolean",
                    "default": false,
                    "description": "Include test accounts. Defaults to false."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 20
                  },
                  "cursor": {
                    "type": "string",
                    "description": "Opaque pagination cursor."
                  },
                  "refresh": {
                    "type": "boolean",
                    "default": false
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-active-accounts": {
                  "summary": "List active accounts",
                  "value": {
                    "reason": "User wants to see their LinkedIn ad accounts"
                  }
                },
                "include-test-accounts": {
                  "summary": "Include test accounts",
                  "value": {
                    "include_test_accounts": true,
                    "reason": "User wants to see test accounts"
                  }
                },
                "by-type": {
                  "summary": "By type",
                  "value": {
                    "type": "BUSINESS",
                    "reason": "Filter to business accounts only"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_check_auth_status": {
      "post": {
        "operationId": "linkedin_ads_check_auth_status",
        "summary": "Check LinkedIn Ads Authentication Status",
        "description": "Troubleshoot authentication issues and get user profile info. Only use when another tool fails with a permission or authentication error — do NOT call proactively.",
        "tags": [
          "auth"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "check-auth": {
                  "summary": "Check auth",
                  "value": {
                    "reason": "Another tool returned an auth error, checking LinkedIn account connection status"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_get_budget_pricing": {
      "post": {
        "operationId": "linkedin_ads_get_budget_pricing",
        "summary": "Get LinkedIn Budget & Pricing",
        "description": "Get bid ranges and daily budget limits for a LinkedIn campaign type and audience. Call this before creating a campaign to understand recommended bids. DYNAMIC campaign type is not supported by this endpoint.",
        "tags": [
          "budget-pricing"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": false,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Ad account ID (numeric, without URN prefix)."
                  },
                  "campaign_type": {
                    "type": "string",
                    "enum": [
                      "TEXT_AD",
                      "SPONSORED_UPDATES",
                      "SPONSORED_INMAILS"
                    ],
                    "description": "Campaign type. DYNAMIC is not supported by this endpoint."
                  },
                  "bid_type": {
                    "type": "string",
                    "enum": [
                      "CPM",
                      "CPC",
                      "CPV"
                    ],
                    "description": "Bid type. CPV is only valid for SPONSORED_UPDATES video campaigns."
                  },
                  "match_type": {
                    "type": "string",
                    "enum": [
                      "EXACT",
                      "AUDIENCE_EXPANDED"
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "description": "ISO-4217 currency code (e.g. USD, GBP)."
                  },
                  "location_urns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "description": "Target location URNs (e.g. urn:li:geo:103644278 for USA)."
                  },
                  "seniority_urns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Target seniority URNs (e.g. urn:li:seniority:4 for Senior)."
                  },
                  "job_function_urns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Target job function URNs."
                  },
                  "industry_urns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Target industry URNs."
                  },
                  "company_size_urns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Target company size range URNs (e.g. urn:li:staffCountRange:(51,200))."
                  },
                  "objective_type": {
                    "type": "string",
                    "description": "Affects suggested bid."
                  },
                  "daily_budget_amount": {
                    "type": "number",
                    "description": "Current or target daily budget (influences suggested bid calculation)."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "account_id",
                  "campaign_type",
                  "bid_type",
                  "match_type",
                  "currency",
                  "location_urns",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "sponsored-content-cpm": {
                  "summary": "Sponsored Content CPM",
                  "value": {
                    "account_id": "123456789",
                    "campaign_type": "SPONSORED_UPDATES",
                    "bid_type": "CPM",
                    "match_type": "EXACT",
                    "currency": "USD",
                    "location_urns": [
                      "urn:li:geo:103644278"
                    ],
                    "reason": "User wants to know bid ranges before creating a campaign"
                  }
                },
                "text-ad-cpc": {
                  "summary": "Text Ad CPC",
                  "value": {
                    "account_id": "123456789",
                    "campaign_type": "TEXT_AD",
                    "bid_type": "CPC",
                    "match_type": "BROAD",
                    "currency": "USD",
                    "location_urns": [
                      "urn:li:geo:103644278"
                    ],
                    "reason": "Get text ad pricing for US audience"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_list_campaign_groups": {
      "post": {
        "operationId": "linkedin_ads_list_campaign_groups",
        "summary": "List LinkedIn Campaign Groups",
        "description": "List LinkedIn Campaign Groups for an ad account. Campaign groups are the top-level organizational unit containing campaigns.",
        "tags": [
          "campaign-groups"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Ad account ID (numeric, without URN prefix)."
                  },
                  "status": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "PAUSED",
                        "DRAFT",
                        "ARCHIVED",
                        "CANCELED",
                        "PENDING_DELETION",
                        "REMOVED"
                      ]
                    },
                    "description": "Filter by status. Defaults to [ACTIVE, PAUSED]."
                  },
                  "campaign_group_id": {
                    "type": "string",
                    "description": "Fetch a single campaign group by numeric ID."
                  },
                  "campaign_group_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Fetch specific campaign groups by numeric IDs (batch GET)."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 20
                  },
                  "cursor": {
                    "type": "string"
                  },
                  "refresh": {
                    "type": "boolean",
                    "default": false
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "account_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-active-groups": {
                  "summary": "List active groups",
                  "value": {
                    "account_id": "123456789",
                    "reason": "User wants to see campaign groups"
                  }
                },
                "filter-by-status": {
                  "summary": "Filter by status",
                  "value": {
                    "account_id": "123456789",
                    "status": [
                      "ACTIVE",
                      "PAUSED"
                    ],
                    "reason": "Show active and paused campaign groups"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_render_chart": {
      "post": {
        "operationId": "linkedin_ads_render_chart",
        "summary": "Render LinkedIn Ads Chart",
        "description": "Interactive chart renderer for LinkedIn Ads performance visualization",
        "tags": [
          "chart"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Brief explanation of why you are rendering this chart"
                  },
                  "chart": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "bar"
                          },
                          "data": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "values": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "label",
                                "values"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "metric": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "format": {
                                    "type": "string"
                                  },
                                  "tickFormat": {
                                    "type": "string"
                                  },
                                  "labelFields": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string"
                                        },
                                        "format": {
                                          "type": "string"
                                        },
                                        "suffix": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "field"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "field",
                                  "label"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "format": {
                                      "type": "string"
                                    },
                                    "tickFormat": {
                                      "type": "string"
                                    },
                                    "labelFields": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "format": {
                                            "type": "string"
                                          },
                                          "suffix": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "field"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "field",
                                    "label"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            ]
                          },
                          "orientation": {
                            "type": "string",
                            "enum": [
                              "horizontal",
                              "vertical"
                            ],
                            "default": "horizontal"
                          },
                          "sort": {
                            "type": "string",
                            "enum": [
                              "asc",
                              "desc",
                              "none"
                            ],
                            "default": "desc"
                          },
                          "colorBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "fixed"
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "threshold"
                                  },
                                  "field": {
                                    "type": "string"
                                  },
                                  "threshold": {
                                    "type": "number"
                                  },
                                  "sentiment": {
                                    "type": "string",
                                    "enum": [
                                      "above-positive",
                                      "above-negative"
                                    ],
                                    "default": "above-positive"
                                  }
                                },
                                "required": [
                                  "type",
                                  "field",
                                  "threshold"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "continuous"
                                  },
                                  "field": {
                                    "type": "string"
                                  },
                                  "scheme": {
                                    "type": "string"
                                  },
                                  "reverse": {
                                    "type": "boolean",
                                    "default": false
                                  },
                                  "muteZero": {
                                    "type": "boolean",
                                    "default": false
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "field",
                                  "scheme"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "categorical"
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "referenceLines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "number"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "dash": {
                                  "type": "string",
                                  "enum": [
                                    "solid",
                                    "dashed"
                                  ],
                                  "default": "dashed"
                                }
                              },
                              "required": [
                                "value"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "table": {
                            "type": "object",
                            "properties": {
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "format": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "field",
                                    "label"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "columns"
                            ],
                            "additionalProperties": false
                          },
                          "panelWidth": {
                            "type": "number"
                          },
                          "width": {
                            "type": "number",
                            "default": 700
                          },
                          "height": {
                            "type": "number",
                            "default": 400
                          }
                        },
                        "required": [
                          "type",
                          "data",
                          "metric"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "scatter"
                          },
                          "data": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "values": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "number"
                                  }
                                }
                              },
                              "required": [
                                "label",
                                "values"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "x": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "scale": {
                                "type": "string",
                                "enum": [
                                  "linear",
                                  "log"
                                ],
                                "default": "linear"
                              },
                              "format": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "label"
                            ],
                            "additionalProperties": false
                          },
                          "y": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "scale": {
                                "type": "string",
                                "enum": [
                                  "linear",
                                  "log"
                                ],
                                "default": "linear"
                              },
                              "format": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "label"
                            ],
                            "additionalProperties": false
                          },
                          "size": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "range": {
                                "type": "array",
                                "items": {
                                  "type": "number"
                                },
                                "minItems": 2,
                                "maxItems": 2,
                                "default": [
                                  3,
                                  20
                                ]
                              }
                            },
                            "required": [
                              "field"
                            ],
                            "additionalProperties": false
                          },
                          "color": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "fixed"
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "continuous"
                                  },
                                  "field": {
                                    "type": "string"
                                  },
                                  "scheme": {
                                    "type": "string"
                                  },
                                  "reverse": {
                                    "type": "boolean",
                                    "default": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "field",
                                  "scheme"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "threshold"
                                  },
                                  "field": {
                                    "type": "string"
                                  },
                                  "threshold": {
                                    "type": "number"
                                  },
                                  "sentiment": {
                                    "type": "string",
                                    "enum": [
                                      "above-positive",
                                      "above-negative"
                                    ],
                                    "default": "above-positive"
                                  }
                                },
                                "required": [
                                  "type",
                                  "field",
                                  "threshold"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "referenceLines": {
                            "type": "object",
                            "properties": {
                              "medianX": {
                                "type": "boolean",
                                "default": false
                              },
                              "medianY": {
                                "type": "boolean",
                                "default": false
                              },
                              "targets": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "slope": {
                                      "type": "number"
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "slope",
                                    "label"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "regression": {
                                "type": "boolean",
                                "default": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "table": {
                            "type": "object",
                            "properties": {
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "format": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "field",
                                    "label"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "columns"
                            ],
                            "additionalProperties": false
                          },
                          "width": {
                            "type": "number",
                            "default": 700
                          },
                          "height": {
                            "type": "number",
                            "default": 450
                          }
                        },
                        "required": [
                          "type",
                          "data",
                          "x",
                          "y"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "timeseries"
                          },
                          "data": {
                            "type": "object",
                            "properties": {
                              "current": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "date": {
                                      "type": "string"
                                    },
                                    "values": {
                                      "type": "object",
                                      "additionalProperties": {
                                        "type": "number"
                                      }
                                    }
                                  },
                                  "required": [
                                    "date",
                                    "values"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "previous": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "date": {
                                      "type": "string"
                                    },
                                    "values": {
                                      "type": "object",
                                      "additionalProperties": {
                                        "type": "number"
                                      }
                                    }
                                  },
                                  "required": [
                                    "date",
                                    "values"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "projection": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "date": {
                                      "type": "string"
                                    },
                                    "values": {
                                      "type": "object",
                                      "additionalProperties": {
                                        "type": "number"
                                      }
                                    }
                                  },
                                  "required": [
                                    "date",
                                    "values"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "current"
                            ],
                            "additionalProperties": false
                          },
                          "primaryAxis": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "mark": {
                                "type": "string",
                                "enum": [
                                  "bar",
                                  "area",
                                  "line"
                                ]
                              },
                              "groupBars": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "field",
                              "label",
                              "mark"
                            ],
                            "additionalProperties": false
                          },
                          "secondaryAxis": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "dash": {
                                "type": "string",
                                "enum": [
                                  "solid",
                                  "dashed"
                                ],
                                "default": "solid"
                              }
                            },
                            "required": [
                              "field",
                              "label"
                            ],
                            "additionalProperties": false
                          },
                          "width": {
                            "type": "number",
                            "default": 700
                          },
                          "height": {
                            "type": "number",
                            "default": 400
                          }
                        },
                        "required": [
                          "type",
                          "data",
                          "primaryAxis"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "funnel"
                          },
                          "data": {
                            "type": "object",
                            "properties": {
                              "stages": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "volume": {
                                "type": "array",
                                "items": {
                                  "type": "number"
                                }
                              },
                              "costPer": {
                                "type": "array",
                                "items": {
                                  "type": "number"
                                }
                              }
                            },
                            "required": [
                              "stages",
                              "volume"
                            ],
                            "additionalProperties": false
                          },
                          "showConversionRates": {
                            "type": "boolean",
                            "default": true
                          },
                          "showCostPer": {
                            "type": "boolean",
                            "default": true
                          },
                          "colorScheme": {
                            "type": "string",
                            "default": "Blues"
                          },
                          "width": {
                            "type": "number",
                            "default": 700
                          },
                          "height": {
                            "type": "number",
                            "default": 350
                          }
                        },
                        "required": [
                          "type",
                          "data"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "waterfall"
                          },
                          "data": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "number"
                                },
                                "colorValue": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "label",
                                "value",
                                "colorValue"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "colorScheme": {
                            "type": "string",
                            "default": "RdYlGn"
                          },
                          "colorLabel": {
                            "type": "string",
                            "default": "CPA ($)"
                          },
                          "valueLabel": {
                            "type": "string",
                            "default": "Cumulative Spend ($)"
                          },
                          "width": {
                            "type": "number",
                            "default": 700
                          },
                          "height": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type",
                          "data"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "choropleth"
                          },
                          "data": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "number"
                                },
                                "meta": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": [
                                      "string",
                                      "number",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "state",
                                "value"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "valueLabel": {
                            "type": "string"
                          },
                          "colorScheme": {
                            "type": "string",
                            "default": "YlOrRd"
                          },
                          "colorType": {
                            "type": "string",
                            "enum": [
                              "quantize",
                              "linear",
                              "threshold"
                            ],
                            "default": "quantize"
                          },
                          "reverse": {
                            "type": "boolean",
                            "default": false
                          },
                          "tip": {
                            "type": "object",
                            "properties": {
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "format": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "field",
                                    "label"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "fields"
                            ],
                            "additionalProperties": false
                          },
                          "width": {
                            "type": "number",
                            "default": 700
                          },
                          "height": {
                            "type": "number",
                            "default": 450
                          }
                        },
                        "required": [
                          "type",
                          "data",
                          "valueLabel"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "reason",
                  "chart"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        },
        "x-mcp-tool-type": "app",
        "x-mcp-chart-types": [
          "bar",
          "scatter",
          "timeseries",
          "funnel",
          "waterfall",
          "choropleth"
        ]
      }
    },
    "/tools/linkedin_ads_list_connections": {
      "post": {
        "operationId": "linkedin_ads_list_connections",
        "summary": "List LinkedIn Connections",
        "description": "List the LinkedIn Ads connections available to you — both ones you own and ones shared with you via an organization. Use this to discover connection IDs for set_default / share / rename / revoke.",
        "tags": [
          "connections"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-connections": {
                  "summary": "List connections",
                  "value": {
                    "reason": "User asked which LinkedIn accounts they have connected"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_set_default_connection": {
      "post": {
        "operationId": "linkedin_ads_set_default_connection",
        "summary": "Set Default LinkedIn Connection",
        "description": "Set the LinkedIn connection that should be used by default for subsequent LinkedIn Ads tool calls. The default is scoped to the calling actor (your user account, or the API key being used).",
        "tags": [
          "set-default-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the connection to mark as the actor's default LinkedIn connection."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "connection_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "set-default": {
                  "summary": "Set default",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "reason": "User picked their primary LinkedIn workspace"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_share_connection": {
      "post": {
        "operationId": "linkedin_ads_share_connection",
        "summary": "Share LinkedIn Connection With Organization",
        "description": "Share an owned LinkedIn connection with all members of your organization, so teammates can use it without having to reconnect LinkedIn themselves. You must be the owner of the connection.",
        "tags": [
          "share-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the connection to share with your organization. You must be the owner."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "connection_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "share-with-org": {
                  "summary": "Share with org",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "reason": "User asked to share this LinkedIn connection with their teammates"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_unshare_connection": {
      "post": {
        "operationId": "linkedin_ads_unshare_connection",
        "summary": "Unshare LinkedIn Connection From Organization",
        "description": "Stop sharing an owned LinkedIn connection with your organization. Teammates lose access immediately. You must be the owner.",
        "tags": [
          "unshare-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": false,
          "destructiveHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the connection to stop sharing with your organization. You must be the owner."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "connection_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "stop-sharing": {
                  "summary": "Stop sharing",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "reason": "User no longer wants the team to access this LinkedIn connection"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_rename_connection": {
      "post": {
        "operationId": "linkedin_ads_rename_connection",
        "summary": "Rename LinkedIn Connection",
        "description": "Rename the display name of an owned LinkedIn connection. The OAuth grant and underlying account are unaffected — this only changes the human-readable label. You must be the owner.",
        "tags": [
          "rename-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the connection to rename. You must be the owner."
                  },
                  "display_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "New human-readable name for the connection."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "connection_id",
                  "display_name",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "rename": {
                  "summary": "Rename",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "display_name": "Acme — Production",
                    "reason": "User wanted a clearer label for this LinkedIn connection"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_revoke_connection": {
      "post": {
        "operationId": "linkedin_ads_revoke_connection",
        "summary": "Revoke LinkedIn Connection",
        "description": "Revoke (soft-delete) an owned LinkedIn connection. Any defaults pointing to it are invalidated and shared org members lose access. The OAuth grant at LinkedIn is NOT revoked by this tool — the user must disconnect via the dashboard if they want to fully revoke at LinkedIn. You must be the owner.",
        "tags": [
          "revoke-connection"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": false,
          "destructiveHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the connection to revoke. You must be the owner."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "connection_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "revoke": {
                  "summary": "Revoke",
                  "value": {
                    "connection_id": "00000000-0000-0000-0000-000000000001",
                    "reason": "User asked to disconnect this LinkedIn account"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_list_creatives": {
      "post": {
        "operationId": "linkedin_ads_list_creatives",
        "summary": "List LinkedIn Creatives",
        "description": "List LinkedIn Creatives (ads) for an ad account. Ad copy (headline, body text, destination URL) is always resolved from linked posts/shares.",
        "tags": [
          "creatives"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Ad account ID (numeric, without URN prefix)."
                  },
                  "campaign_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "Filter by campaign IDs (numeric)."
                  },
                  "status": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "PAUSED",
                        "DRAFT",
                        "ARCHIVED",
                        "CANCELED",
                        "PENDING_DELETION",
                        "REMOVED"
                      ]
                    },
                    "description": "Filter by intended status. Defaults to [ACTIVE, PAUSED, DRAFT]."
                  },
                  "creative_id": {
                    "type": "string",
                    "description": "Fetch a single creative by URN or numeric ID."
                  },
                  "creative_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Fetch specific creatives by numeric IDs (batch filter)."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 20
                  },
                  "cursor": {
                    "type": "string"
                  },
                  "refresh": {
                    "type": "boolean",
                    "default": false
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "account_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-active-creatives": {
                  "summary": "List active creatives",
                  "value": {
                    "account_id": "123456789",
                    "reason": "User wants to see ads"
                  }
                },
                "by-campaign": {
                  "summary": "By campaign",
                  "value": {
                    "account_id": "123456789",
                    "campaign_ids": [
                      "654321"
                    ],
                    "reason": "Show creatives for a specific campaign"
                  }
                },
                "with-content-resolved": {
                  "summary": "With content resolved",
                  "value": {
                    "account_id": "123456789",
                    "reason": "Show ad copy and headline text"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_developer_feedback": {
      "post": {
        "operationId": "linkedin_ads_developer_feedback",
        "summary": "Submit Developer Feedback",
        "description": "Submit feedback about missing tools, improvements, or workflow gaps in the LinkedIn Ads MCP toolset. Not for user-facing issues like auth or API errors.",
        "tags": [
          "feedback"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "feedback_type": {
                    "type": "string",
                    "enum": [
                      "new_tool",
                      "improvement",
                      "bug",
                      "workflow_gap"
                    ],
                    "description": "Feedback category: new_tool (request new capability), improvement (enhance existing tool), bug (report issue), workflow_gap (missing workflow)"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 200,
                    "description": "Concise title summarizing the feedback"
                  },
                  "description": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 2000,
                    "description": "What is needed and why"
                  },
                  "current_workaround": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Current workaround, if any"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ],
                    "default": "medium",
                    "description": "Impact level: low (nice-to-have), medium (improves workflow), high (blocking issue)"
                  },
                  "interface": {
                    "type": "string",
                    "enum": [
                      "MCP",
                      "CLI"
                    ],
                    "default": "MCP",
                    "description": "Interface the feedback originated from: MCP (default) or CLI"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "feedback_type",
                  "title",
                  "description",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "missing-tool": {
                  "summary": "Missing tool",
                  "value": {
                    "feedback_type": "new_tool",
                    "title": "Bulk campaign status toggle",
                    "description": "Need to pause/enable multiple LinkedIn campaigns at once rather than one by one",
                    "priority": "high",
                    "reason": "User asked to pause 8 campaigns individually"
                  }
                },
                "workflow-gap": {
                  "summary": "Workflow gap",
                  "value": {
                    "feedback_type": "workflow_gap",
                    "title": "Campaign group hierarchy cloning",
                    "description": "No way to duplicate a campaign group including all campaigns and creatives",
                    "current_workaround": "Read and recreate each level one by one",
                    "reason": "User wanted to duplicate campaign structure for A/B test"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_get_insights": {
      "post": {
        "operationId": "linkedin_ads_get_insights",
        "summary": "Get LinkedIn Ads Insights",
        "description": "Get LinkedIn Ads analytics with a single pivot dimension. For standard analysis, prefer linkedin_ads_get_performance_report; use this only for MEMBER_* demographic pivots (unique to LinkedIn) or custom metric queries not available in the performance report. MEMBER_* pivots have a 3-event minimum threshold and 12-24 hour data delay, so totals may not match account-level numbers. Max 18 metrics per query.",
        "tags": [
          "insights"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Ad account ID (numeric, without URN prefix)."
                  },
                  "pivot": {
                    "type": "string",
                    "enum": [
                      "ACCOUNT",
                      "CAMPAIGN_GROUP",
                      "CAMPAIGN",
                      "CREATIVE",
                      "SHARE",
                      "COMPANY",
                      "CONVERSION",
                      "CONVERSATION_NODE",
                      "SERVING_LOCATION",
                      "PLACEMENT_NAME",
                      "IMPRESSION_DEVICE_TYPE",
                      "CARD_INDEX",
                      "MEMBER_COMPANY_SIZE",
                      "MEMBER_INDUSTRY",
                      "MEMBER_SENIORITY",
                      "MEMBER_JOB_TITLE",
                      "MEMBER_JOB_FUNCTION",
                      "MEMBER_COUNTRY_V2",
                      "MEMBER_REGION_V2",
                      "MEMBER_COUNTY",
                      "MEMBER_COMPANY"
                    ],
                    "description": "Analytics pivot dimension. MEMBER_* pivots provide demographic breakdowns unique to LinkedIn."
                  },
                  "date_preset": {
                    "type": "string",
                    "enum": [
                      "LAST_7_DAYS",
                      "LAST_14_DAYS",
                      "LAST_30_DAYS",
                      "THIS_MONTH",
                      "LAST_MONTH",
                      "LAST_90_DAYS"
                    ],
                    "default": "LAST_30_DAYS"
                  },
                  "start_date": {
                    "type": "string",
                    "description": "ISO date YYYY-MM-DD. Use with end_date to override date_preset."
                  },
                  "end_date": {
                    "type": "string"
                  },
                  "time_granularity": {
                    "type": "string",
                    "enum": [
                      "ALL",
                      "DAILY",
                      "MONTHLY"
                    ],
                    "default": "ALL"
                  },
                  "campaign_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Filter to specific campaigns (numeric IDs)."
                  },
                  "campaign_group_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "Filter to specific campaign groups (numeric IDs)."
                  },
                  "metrics": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 18,
                    "description": "LinkedIn adAnalytics metric field names (camelCase, exact names required). Core: impressions, clicks, costInLocalCurrency, costInUsd. Conversions: externalWebsiteConversions, externalWebsitePostClickConversions, externalWebsitePostViewConversions, conversionValueInLocalCurrency. Leads: oneClickLeads, oneClickLeadFormOpens, qualifiedLeads. Video: videoViews, videoCompletions. Engagement: totalEngagements, shares, follows, reactions, comments, landingPageClicks, textUrlClicks, companyPageClicks. Card: cardImpressions, cardClicks, viralCardImpressions, viralCardClicks. Reach: approximateMemberReach (only with ACCOUNT/CAMPAIGN_GROUP/CAMPAIGN pivot, ≤92 day range). IMPORTANT: Do NOT use aliases like \"conversions\", \"leads\", \"spend\", or \"reach\" — use the exact camelCase field names listed above. Max 18 (pivotValues + dateRange count toward the 20-field API limit). Defaults to: impressions, clicks, costInLocalCurrency, costInUsd, externalWebsiteConversions, oneClickLeads, videoViews, totalEngagements."
                  },
                  "include_conversion_breakdown": {
                    "type": "boolean",
                    "default": false,
                    "description": "When true (and pivot is not CONVERSION), runs a second query to break down conversions per action with names."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "account_id",
                  "pivot",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "job-function-breakdown": {
                  "summary": "Job function breakdown",
                  "value": {
                    "account_id": "123456789",
                    "pivot": "MEMBER_JOB_FUNCTION",
                    "date_preset": "LAST_30_DAYS",
                    "reason": "Demographic breakdown by job function"
                  }
                },
                "seniority-breakdown": {
                  "summary": "Seniority breakdown",
                  "value": {
                    "account_id": "123456789",
                    "pivot": "MEMBER_SENIORITY",
                    "date_preset": "LAST_30_DAYS",
                    "reason": "Performance by member seniority level"
                  }
                },
                "industry-breakdown": {
                  "summary": "Industry breakdown",
                  "value": {
                    "account_id": "123456789",
                    "pivot": "MEMBER_INDUSTRY",
                    "date_preset": "LAST_30_DAYS",
                    "reason": "Reach and engagement by industry"
                  }
                },
                "device-type-breakdown": {
                  "summary": "Device type breakdown",
                  "value": {
                    "account_id": "123456789",
                    "pivot": "IMPRESSION_DEVICE_TYPE",
                    "date_preset": "LAST_30_DAYS",
                    "reason": "Performance split by device type"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON report data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_get_partner_conversions": {
      "post": {
        "operationId": "linkedin_ads_get_partner_conversions",
        "summary": "Get LinkedIn Partner Conversions",
        "description": "List partner conversions (conversion actions) configured for a LinkedIn Ads account. Use this to understand what conversion tracking is set up before analyzing performance data.",
        "tags": [
          "partner-conversions"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Ad account ID (numeric, without URN prefix)."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "account_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "list-all-partner-conversions": {
                  "summary": "List all partner conversions",
                  "value": {
                    "account_id": "123456789",
                    "reason": "User wants to see what partner conversions are configured"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_get_performance_report": {
      "post": {
        "operationId": "linkedin_ads_get_performance_report",
        "summary": "Get LinkedIn Ads Performance Report",
        "description": "Get a full-funnel performance report with up to 3 pivot dimensions and optional per-conversion-action breakdown. MEMBER_* demographic pivots are not supported here — use linkedin_ads_get_insights instead.",
        "tags": [
          "reporting"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": true
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Ad account ID (numeric, without URN prefix)."
                  },
                  "pivots": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "ACCOUNT",
                        "CAMPAIGN_GROUP",
                        "CAMPAIGN",
                        "CREATIVE",
                        "SHARE",
                        "COMPANY",
                        "CONVERSION",
                        "SERVING_LOCATION",
                        "PLACEMENT_NAME",
                        "IMPRESSION_DEVICE_TYPE",
                        "CARD_INDEX",
                        "OBJECTIVE_TYPE"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 3,
                    "default": [
                      "CAMPAIGN"
                    ],
                    "description": "Up to 3 pivot dimensions. OBJECTIVE_TYPE is only available in q=statistics."
                  },
                  "date_preset": {
                    "type": "string",
                    "enum": [
                      "LAST_7_DAYS",
                      "LAST_14_DAYS",
                      "LAST_30_DAYS",
                      "THIS_MONTH",
                      "LAST_MONTH",
                      "LAST_90_DAYS"
                    ],
                    "default": "LAST_30_DAYS"
                  },
                  "start_date": {
                    "type": "string"
                  },
                  "end_date": {
                    "type": "string"
                  },
                  "time_granularity": {
                    "type": "string",
                    "enum": [
                      "ALL",
                      "DAILY",
                      "MONTHLY"
                    ],
                    "default": "ALL"
                  },
                  "campaign_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 50
                  },
                  "campaign_group_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 20
                  },
                  "include_conversion_breakdown": {
                    "type": "boolean",
                    "default": true,
                    "description": "Run a second query for per-conversion-action breakdown. Adds one extra API call."
                  },
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs."
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "account_id",
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "campaign-report": {
                  "summary": "Campaign report",
                  "value": {
                    "account_id": "123456789",
                    "pivots": [
                      "CAMPAIGN"
                    ],
                    "date_preset": "LAST_30_DAYS",
                    "reason": "User wants full campaign performance report"
                  }
                },
                "with-conversion-breakdown": {
                  "summary": "With conversion breakdown",
                  "value": {
                    "account_id": "123456789",
                    "pivots": [
                      "CAMPAIGN"
                    ],
                    "date_preset": "LAST_30_DAYS",
                    "include_conversion_breakdown": true,
                    "reason": "Show conversion breakdown by campaign"
                  }
                },
                "daily-campaign-group": {
                  "summary": "Daily campaign group",
                  "value": {
                    "account_id": "123456789",
                    "pivots": [
                      "CAMPAIGN_GROUP"
                    ],
                    "time_granularity": "DAILY",
                    "date_preset": "LAST_7_DAYS",
                    "reason": "Daily trend by campaign group"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON report data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    },
    "/tools/linkedin_ads_ping": {
      "post": {
        "operationId": "linkedin_ads_ping",
        "summary": "Ping LinkedIn Ads MCP Server",
        "description": "Health check for the LinkedIn Ads MCP server. Does not call the LinkedIn API.",
        "tags": [
          "auth"
        ],
        "x-mcp-annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Optional message to echo back"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Why this tool call is needed"
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              },
              "examples": {
                "health-check": {
                  "summary": "Health check",
                  "value": {
                    "reason": "Verify server is running"
                  }
                },
                "with-message": {
                  "summary": "With message",
                  "value": {
                    "message": "hello",
                    "reason": "Test connectivity"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Markdown-formatted result with structured content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolResult"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpError"
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parameters — request body failed schema validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Supabase JWT or hpk_live_... API key"
      }
    },
    "schemas": {
      "McpToolResult": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "resource_link"
                  ]
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "structuredContent": {
            "type": "object",
            "additionalProperties": true
          },
          "isError": {
            "type": "boolean"
          }
        }
      },
      "McpError": {
        "type": "object",
        "properties": {
          "isError": {
            "type": "boolean",
            "const": true
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "text"
                },
                "text": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "RestError": {
        "type": "object",
        "description": "Error response from REST tool endpoints (mapped from JSON-RPC error codes)",
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable error message"
          },
          "code": {
            "type": "integer",
            "description": "JSON-RPC error code"
          },
          "data": {
            "description": "Additional error context"
          }
        },
        "required": [
          "error",
          "code"
        ]
      },
      "ToolList": {
        "type": "object",
        "properties": {
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inputSchema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "discovery",
      "description": "Tool discovery and introspection"
    },
    {
      "name": "account-summary",
      "description": "Account-summary tools"
    },
    {
      "name": "ad-accounts",
      "description": "Ad-accounts tools"
    },
    {
      "name": "auth",
      "description": "Auth tools"
    },
    {
      "name": "budget-pricing",
      "description": "Budget-pricing tools"
    },
    {
      "name": "campaign-groups",
      "description": "Campaign-groups tools"
    },
    {
      "name": "chart",
      "description": "Chart tools"
    },
    {
      "name": "connections",
      "description": "Connections tools"
    },
    {
      "name": "creatives",
      "description": "Creatives tools"
    },
    {
      "name": "feedback",
      "description": "Feedback tools"
    },
    {
      "name": "insights",
      "description": "Insights tools"
    },
    {
      "name": "partner-conversions",
      "description": "Partner-conversions tools"
    },
    {
      "name": "rename-connection",
      "description": "Rename-connection tools"
    },
    {
      "name": "reporting",
      "description": "Reporting tools"
    },
    {
      "name": "revoke-connection",
      "description": "Revoke-connection tools"
    },
    {
      "name": "set-default-connection",
      "description": "Set-default-connection tools"
    },
    {
      "name": "share-connection",
      "description": "Share-connection tools"
    },
    {
      "name": "unshare-connection",
      "description": "Unshare-connection tools"
    }
  ]
}