{
  "api_version": "1.0.0",
  "min_client_api_version": "1.0.0",
  "compatibility": {
    "json_schema_dialect": "http://json-schema.org/draft-07/schema#",
    "mcp_protocol_version": "2025-06-18",
    "sdk_version": "0.20.0",
    "server_version": "0.4.0",
    "deprecations": []
  },
  "version": 1,
  "sdk_version": "0.20.0",
  "path": "/mcp",
  "auth": {
    "type": "oauth",
    "issuer": "https://rnjiwfeunznxfivalcws.supabase.co/auth/v1",
    "accepted_audiences": [
      "authenticated"
    ]
  },
  "mcp": {
    "server": {
      "name": "partnersignals-portal-mcp",
      "version": "0.4.0",
      "title": "PartnerSignals Portal"
    },
    "tools": [
      {
        "name": "list_partner_motions",
        "title": "List partner motions (v1.5 catalog)",
        "description": "Returns the v1.5 PartnerSignals partner-motion catalog. Each motion includes motion_slug (the machine key), activity_name (display name), category (one of 6), subcategory (Deal Execution sub-bucket or null), lifecycle_band, and attribution_tier. Use this to discover available motions before calling submit_partner_motion. Only returns motions enabled for the calling partner's organization. Admin-only motions (e.g. deal_registration_review) are excluded.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "category": {
              "type": "string",
              "description": "Optional filter by category name (e.g. 'Deal Execution')"
            }
          },
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null,
        "examples": []
      },
      {
        "name": "list_partner_motion_categories",
        "title": "List partner motion categories (v1.5)",
        "description": "Returns the 6 top-level partner motion categories and the 4 sub-buckets within Deal Execution. Use this to understand the catalog structure before calling list_partner_motions with a category filter.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {}
        },
        "outputSchema": null,
        "examples": []
      },
      {
        "name": "submit_partner_motion",
        "title": "Submit a partner motion",
        "description": "Records a partner motion against a customer account. Use list_partner_motions to discover valid motion_slugs first. The motion is submitted immediately (status = submitted). Admin-only motions (e.g. deal_registration_review) are blocked. Returns the created motion record including its id.",
        "annotations": {
          "readOnlyHint": false,
          "idempotentHint": false,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "motion_slug": {
              "type": "string",
              "description": "The motion slug from list_partner_motions (e.g. 'joint_customer_call')"
            },
            "account_id": {
              "type": "string",
              "description": "UUID of the customer account this motion is associated with"
            },
            "opportunity_id": {
              "type": "string",
              "description": "Optional UUID of an existing deal registration to link this motion to"
            },
            "related_partner_id": {
              "type": "string",
              "description": "Optional UUID of a second partner involved in this motion"
            },
            "notes": {
              "type": "string",
              "description": "Optional free-text notes about the motion"
            }
          },
          "required": [
            "motion_slug",
            "account_id"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null,
        "examples": []
      },
      {
        "name": "register_deal",
        "title": "Create Deal Reg",
        "description": "STEP 2 of the deal-registration workflow — the programmatic equivalent of the partner portal's \"Create Deal Reg\" button (top-right of /deal-registration, also reachable from the dashboard \"Register a Deal\" tile). Submits a new deal registration for the signed-in partner; the deal is created with status=`submitted` and enters the PartnerSignals review queue (typically decided within 2 business days). Prerequisite: call `list_motions` (Step 1) to obtain a valid motion_code. Required fields: company_name, estimated_arr (USD, integer dollars), expected_close_date (YYYY-MM-DD), deal_stage (Prospect|Qualified|Proposal|Commit), platform (AWS|Azure|Google|Oracle|On-Prem|Hybrid), motion_code (from Step 1), description. Optional: prospect_domain, hyperscaler_cosell (bool), product_interest. Ask the user for each required field — do not guess or fabricate values. Next step: `get_deal` with the returned id, or `list_my_deals` to see it alongside prior submissions (portal equivalent: /deal-registration).",
        "annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": false,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "company_name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Prospect company name, e.g. 'Acme Corp'."
            },
            "prospect_domain": {
              "type": "string",
              "maxLength": 200,
              "description": "Prospect website domain without protocol, e.g. 'acme.com'. Optional but recommended."
            },
            "estimated_arr": {
              "type": "number",
              "minimum": 0,
              "maximum": 999999999999,
              "description": "Estimated annual recurring revenue in USD (integer dollars, no currency symbol)."
            },
            "expected_close_date": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "Expected close date in ISO YYYY-MM-DD format."
            },
            "deal_stage": {
              "type": "string",
              "enum": [
                "Prospect",
                "Qualified",
                "Proposal",
                "Commit"
              ],
              "description": "Current sales stage of the opportunity."
            },
            "platform": {
              "type": "string",
              "enum": [
                "AWS",
                "Azure",
                "Google",
                "Oracle",
                "On-Prem",
                "Hybrid"
              ],
              "description": "Target platform / hyperscaler for the deal."
            },
            "motion_code": {
              "type": "string",
              "enum": [
                "S1",
                "S2",
                "S3",
                "S4",
                "CS1",
                "CS2",
                "CS3",
                "CS4",
                "CS5",
                "CS6",
                "CS7",
                "CS8",
                "IN1",
                "IN2",
                "IN3",
                "IN4",
                "IN5",
                "IN6",
                "IN7",
                "IN8",
                "IN9"
              ],
              "description": "Partner motion code from the PartnerSignals catalog. Call list_motions to see labels."
            },
            "description": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000,
              "description": "Narrative about the opportunity and the partner's relationship with the customer."
            },
            "hyperscaler_cosell": {
              "type": "boolean",
              "description": "True if this deal should also be submitted for hyperscaler co-sell registration. Defaults to false."
            },
            "product_interest": {
              "type": "string",
              "maxLength": 500,
              "description": "Optional short list of products the prospect is interested in."
            }
          },
          "required": [
            "company_name",
            "estimated_arr",
            "expected_close_date",
            "deal_stage",
            "platform",
            "motion_code",
            "description"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null,
        "examples": []
      },
      {
        "name": "list_my_deals",
        "title": "List my Deal Regs",
        "description": "STEP 3 of the deal-registration workflow (tracking) — the programmatic equivalent of the partner portal's /deal-registration list page. Lists the signed-in partner's deal registrations, newest first. Supports pagination via `limit` + `offset` and filtering by one or more statuses (draft, submitted, approved, rejected, expired). Returns rows plus `pagination` metadata (`total`, `limit`, `offset`, `nextOffset`, `hasMore`) so an agent can page through results without guessing. Next step: call `get_deal` with a row's id for full details (portal equivalent: /deal-registration/{id}). To create another, use `register_deal` (\"Create Deal Reg\").",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Page size, 1–100. Defaults to 25."
            },
            "offset": {
              "type": "integer",
              "minimum": 0,
              "description": "Zero-based row offset for pagination. Defaults to 0. Use the `nextOffset` returned in the previous call."
            },
            "status": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "draft",
                    "submitted",
                    "approved",
                    "rejected",
                    "expired"
                  ]
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "submitted",
                      "approved",
                      "rejected",
                      "expired"
                    ]
                  },
                  "minItems": 1
                }
              ],
              "description": "Filter by status. Pass a single value (e.g. \"submitted\") or an array (e.g. [\"submitted\",\"approved\"]). Omit to return all statuses."
            }
          },
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null,
        "examples": [
          {
            "name": "recent",
            "description": "Default call — 25 newest deals for the signed-in partner.",
            "input": {},
            "output": {
              "deals": [
                {
                  "id": "b1e5c2a0-2a1f-4b0e-8f5a-2a5a1f4b0e8f",
                  "company_name": "Acme Retail",
                  "motion_code": "resell",
                  "deal_stage": "qualification",
                  "estimated_arr": 48000,
                  "status": "submitted",
                  "created_at": "2026-06-28T14:12:03.000Z",
                  "expected_close_date": "2026-09-30"
                }
              ]
            }
          },
          {
            "name": "approved-only",
            "description": "Filter by status; cap results.",
            "input": {
              "status": "approved",
              "limit": 10
            },
            "output": {
              "deals": []
            }
          }
        ]
      },
      {
        "name": "get_deal",
        "title": "Get Deal Reg by id",
        "description": "STEP 3 of the deal-registration workflow (tracking) — the programmatic equivalent of the partner portal's /deal-registration/{id} detail page. Fetches a single Deal Reg by id with full details: company, stage, motion, ARR, close date, description, hyperscaler_cosell flag, current status, review_notes (once reviewed), and timestamps. RLS restricts this to the signed-in partner's own deals (admins see all). To list all of a partner's Deal Regs, use `list_my_deals`; to create a new one, use `register_deal` (\"Create Deal Reg\").",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "description": "Deal registration UUID (from list_my_deals or the register_deal response)."
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null,
        "examples": [
          {
            "name": "by-id",
            "input": {
              "id": "b1e5c2a0-2a1f-4b0e-8f5a-2a5a1f4b0e8f"
            },
            "output": {
              "deal": {
                "id": "b1e5c2a0-2a1f-4b0e-8f5a-2a5a1f4b0e8f",
                "company_name": "Acme Retail",
                "deal_name": "Acme — POS refresh",
                "prospect_domain": "acme.example",
                "motion_code": "resell",
                "deal_stage": "qualification",
                "partner_role": "lead",
                "platform": "shopify",
                "estimated_arr": 48000,
                "expected_close_date": "2026-09-30",
                "product_interest": [
                  "core",
                  "analytics"
                ],
                "description": "Replacing legacy POS across 40 stores.",
                "hyperscaler_cosell": null,
                "status": "submitted",
                "review_notes": null,
                "created_at": "2026-06-28T14:12:03.000Z",
                "updated_at": "2026-06-28T14:12:03.000Z"
              }
            }
          },
          {
            "name": "not-found",
            "description": "Returns isError=true when the UUID doesn't match an accessible deal.",
            "input": {
              "id": "00000000-0000-0000-0000-000000000000"
            },
            "output": {
              "isError": true,
              "message": "Deal not found"
            }
          }
        ]
      },
      {
        "name": "search_content",
        "title": "Search partner content library",
        "description": "Search published, audience-matched content items in the partner library. RLS enforces audience_functions and admin_only visibility automatically.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Text to match against title/description."
            },
            "content_type": {
              "type": "string",
              "enum": [
                "document",
                "deck",
                "video",
                "link"
              ]
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "description": "Maximum rows to return (default 20)."
            }
          },
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null,
        "examples": [
          {
            "name": "text-query",
            "input": {
              "query": "onboarding",
              "limit": 5
            },
            "output": {
              "items": [
                {
                  "id": "9c2f1a7e-4d33-4d0a-9a71-8b3a8b3a8b3a",
                  "title": "Partner onboarding checklist",
                  "description": "Step-by-step activation guide for new partners.",
                  "category": "enablement",
                  "content_type": "document",
                  "collection_id": "8a1b2c3d-4e5f-6789-0abc-def012345678",
                  "external_url": null,
                  "created_at": "2026-05-14T09:00:00.000Z"
                }
              ]
            }
          },
          {
            "name": "type-filter",
            "input": {
              "content_type": "video"
            },
            "output": {
              "items": []
            }
          }
        ]
      },
      {
        "name": "list_announcements",
        "title": "List active announcements",
        "description": "List active portal announcements visible to the signed-in partner. RLS filters by audience_functions and active/current window.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "description": "Maximum rows to return (default 20)."
            }
          },
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null,
        "examples": [
          {
            "name": "active",
            "input": {},
            "output": {
              "announcements": [
                {
                  "id": "3f4b5c6d-7e8f-9012-3456-7890abcdef01",
                  "title": "Q3 SPIFF window is open",
                  "body": "Register deals by Sep 30 to qualify for the Q3 accelerator.",
                  "severity": "info",
                  "starts_at": "2026-07-01T00:00:00.000Z",
                  "ends_at": "2026-09-30T23:59:59.000Z",
                  "created_at": "2026-06-25T16:00:00.000Z"
                }
              ]
            }
          }
        ]
      }
    ]
  },
  "endpoints": {
    "mcp": "https://eco.partnersignals.ai/mcp",
    "oauth_protected_resource": "https://eco.partnersignals.ai/.well-known/oauth-protected-resource"
  }
}