{
  "tools": [
    {
      "name": "ping",
      "title": "Ping",
      "description": "Health check; returns authenticated user and organization context",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "description": "Authenticated user and organization context",
        "properties": {
          "user_id": {
            "type": "integer"
          },
          "email": {
            "type": "string"
          },
          "organization_id": {
            "type": "integer"
          },
          "organization_name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resource_url": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "email",
          "organization_id",
          "organization_name",
          "scopes",
          "resource_url"
        ]
      },
      "annotations": {
        "title": "Ping",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_profile",
      "title": "Get User Profile",
      "description": "Load the authenticated user's profile and organization memberships. Call this first when the user names a team or organization, or to list the organizations they can query. Use a returned organization id as organization_id on search and list tools (search_contacts, search_users, get_forms, get_inventory, get_org_activity, get_user_activity, get_user_incomplete_tasks, get_user_calendar_events, get_user_goals, get_user_performance, get_user_goal_detail). Omit organization_id on those tools to use current_organization. Does not change the user's selected organization.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "description": "Authenticated user profile and organization memberships",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": "string"
              },
              "role": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "email",
              "role"
            ]
          },
          "current_organization": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "organizations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_current": {
                  "type": "boolean"
                },
                "ai_enabled": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "is_current",
                "ai_enabled"
              ]
            }
          }
        },
        "required": [
          "user",
          "current_organization",
          "organizations"
        ]
      },
      "annotations": {
        "title": "Get User Profile",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "search_contacts",
      "title": "Search Contacts",
      "description": "Search accessible Outfield accounts and people by name, company, address, email, phone, or other contact data. When order_by is supplied, query may be omitted to browse accessible contacts. Valid order_by values are created_at, last_interaction_at (last activity; not last_activity_at), last_touchpoint_at, last_check_in_at, last_onsite_check_in_at, last_meeting_at, last_phone_call_at, last_text_message_at, last_email_at, last_progressed_deal_at, last_revenue_deal_at, and last_form_completed_ats. Use last_form_completed_ats only with root_form_id from get_forms. For example, to find accounts last checked in with 1 to 4 weeks ago, use contact_type=place, order_by=last_check_in_at, start_date, and end_date. Use cursor=meta.next_cursor to continue through additional pages while meta.has_more is true. Use a returned contact id as contact_id for get_contact_detail, get_contact_activity, or get_contact_deals. If multiple contacts could match, ask the user to clarify before loading details, activity, or deals. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to search the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Full-text contact search query; required unless order_by is supplied"
          },
          "contact_type": {
            "type": "string",
            "description": "Restrict results to place (account) or person"
          },
          "order_by": {
            "type": "string",
            "description": "Sort/filter field: created_at, last_interaction_at (last activity), last_touchpoint_at, last_check_in_at, last_onsite_check_in_at, last_meeting_at, last_phone_call_at, last_text_message_at, last_email_at, last_progressed_deal_at, last_revenue_deal_at, or last_form_completed_ats"
          },
          "order_direction": {
            "type": "string",
            "description": "Sort direction: asc or desc. Defaults to asc when order_by is supplied"
          },
          "start_date": {
            "type": "string",
            "description": "Optional inclusive start date/time for order_by"
          },
          "end_date": {
            "type": "string",
            "description": "Optional inclusive end date/time for order_by"
          },
          "root_form_id": {
            "type": "integer",
            "description": "Required when order_by is last_form_completed_ats; obtain from get_forms"
          },
          "limit": {
            "type": "integer",
            "description": "Max contacts returned per page. Default 10, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque cursor from meta.next_cursor"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "organization_id": {
                  "type": "integer"
                },
                "organization_name": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp"
                },
                "updated_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp"
                },
                "contact_type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "place or person"
                },
                "company": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name_and_address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_interaction_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_touchpoint_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_check_in_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_onsite_check_in_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_meeting_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_phone_call_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_text_message_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_email_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_progressed_deal_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_revenue_deal_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "last_form_completed_ats": {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "organization_id",
                "organization_name",
                "name",
                "created_at",
                "updated_at",
                "contact_type",
                "company",
                "title",
                "name_and_address",
                "last_interaction_at",
                "last_touchpoint_at",
                "last_check_in_at",
                "last_onsite_check_in_at",
                "last_meeting_at",
                "last_phone_call_at",
                "last_text_message_at",
                "last_email_at",
                "last_progressed_deal_at",
                "last_revenue_deal_at",
                "last_form_completed_ats"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "query": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contact_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order_by": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order_direction": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of filter range"
              },
              "root_form_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "limit": {
                "type": "integer"
              },
              "result_count": {
                "type": "integer"
              },
              "truncated": {
                "type": "boolean"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "query",
              "contact_type",
              "order_by",
              "order_direction",
              "start_date",
              "end_date",
              "root_form_id",
              "limit",
              "result_count",
              "truncated",
              "has_more",
              "next_cursor",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "contacts",
          "meta"
        ]
      },
      "annotations": {
        "title": "Search Contacts",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_contact_detail",
      "title": "Get Contact Detail",
      "description": "Load all structured details for an accessible Outfield place or person (i.e. account/contact), including contact information, custom fields, default fields, images, activity timestamps, contact goals with progress, and up to 500 linked contacts. Use search_contacts first to resolve an unambiguous contact ID. Contact IDs work across organizations the user belongs to.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "integer",
            "description": "Account/contact ID"
          }
        },
        "required": [
          "contact_id"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "contact_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "place or person"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "website": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "metadata": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "is_blocked_from_deals": {
                "type": "boolean"
              },
              "last_interaction_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_touchpoint_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_check_in_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_onsite_check_in_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_meeting_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_phone_call_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_text_message_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_email_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_progressed_deal_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_revenue_deal_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 timestamp"
              },
              "last_form_completed_ats": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "addresses": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "street1": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "street2": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "city": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "region": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "postal_code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "latitude": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "longitude": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "has_custom_map_coordinates": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "street1",
                    "street2",
                    "city",
                    "region",
                    "postal_code",
                    "country",
                    "latitude",
                    "longitude",
                    "has_custom_map_coordinates",
                    "created_at",
                    "updated_at"
                  ]
                }
              },
              "phones": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preferred": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "value",
                    "preferred",
                    "created_at",
                    "updated_at"
                  ]
                }
              },
              "emails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preferred": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "value",
                    "preferred",
                    "created_at",
                    "updated_at"
                  ]
                }
              },
              "images": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "original_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "thumbnail_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "format": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "original_url",
                    "thumbnail_url",
                    "format",
                    "created_at",
                    "updated_at"
                  ]
                }
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "value",
                    "created_at",
                    "updated_at"
                  ]
                }
              },
              "default_field_values": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "default_field_id": {
                      "type": "integer"
                    },
                    "default_field_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "default_field_type": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 timestamp"
                    }
                  },
                  "required": [
                    "id",
                    "value",
                    "default_field_id",
                    "default_field_name",
                    "default_field_type",
                    "created_at",
                    "updated_at"
                  ]
                }
              },
              "linked_contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "contact_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "place or person"
                    },
                    "company": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "contact_type",
                    "company",
                    "title"
                  ]
                },
                "description": "Up to 500 accessible directly linked contacts"
              },
              "goals": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "goal_type": {
                      "type": "string",
                      "description": "contact, individual, or combined"
                    },
                    "frequency": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "count": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Goal target"
                    },
                    "custom_due_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO8601 date"
                    },
                    "created_at": {
                      "type": "string",
                      "description": "ISO8601 timestamp"
                    },
                    "progress_count": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "name",
                    "goal_type",
                    "frequency",
                    "count",
                    "custom_due_date",
                    "created_at",
                    "progress_count"
                  ]
                }
              }
            },
            "required": [
              "id",
              "name",
              "created_at",
              "updated_at",
              "contact_type",
              "company",
              "title",
              "website",
              "note",
              "metadata",
              "is_blocked_from_deals",
              "last_interaction_at",
              "last_touchpoint_at",
              "last_check_in_at",
              "last_onsite_check_in_at",
              "last_meeting_at",
              "last_phone_call_at",
              "last_text_message_at",
              "last_email_at",
              "last_progressed_deal_at",
              "last_revenue_deal_at",
              "last_form_completed_ats",
              "addresses",
              "phones",
              "emails",
              "images",
              "custom_fields",
              "default_field_values",
              "linked_contacts",
              "goals"
            ]
          }
        },
        "required": [
          "contact"
        ]
      },
      "annotations": {
        "title": "Get Contact Detail",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_contact_activity",
      "title": "Get Contact Activity",
      "description": "Load structured account/contact activity for AI summarization. Returns up to 50 interactions per call, newest first. If meta.has_more is true, you can call again with cursor set to meta.next_cursor to fetch the next older page if appropriate. You can repeat until meta.has_more is false to retrieve the full activity history, but more than the first page is not necessary if you were prompted to summarize recent activity for example.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "integer",
            "description": "Account/contact ID"
          },
          "interaction_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Limit to specific interaction IDs"
          },
          "start_date": {
            "type": "string",
            "description": "Start of activity date range (paired with end_date)"
          },
          "end_date": {
            "type": "string",
            "description": "End of activity date range (paired with start_date)"
          },
          "limit": {
            "type": "integer",
            "description": "Max interactions returned per page. Default 50, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of older interactions when meta.has_more is true."
          }
        },
        "required": [
          "contact_id"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contact_type": {
                "type": "string",
                "description": "place or person"
              }
            },
            "required": [
              "id",
              "name",
              "contact_type"
            ]
          },
          "included_contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Contact plus linked contact IDs included in the activity scope"
          },
          "interactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "interaction_type": {
                  "type": "string"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp"
                },
                "user": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Creator or owner display name"
                },
                "contacts": {
                  "type": "string",
                  "description": "Comma-joined contact names"
                },
                "form_results": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ended_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Actual end or check-out as an ISO8601 timestamp"
                },
                "reported_ended_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Recorded start (or interaction occurrence time when unavailable) plus reported duration as an ISO8601 timestamp"
                },
                "recorded_duration_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Elapsed time from recorded start to end, rounded to whole minutes"
                },
                "reported_duration_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Rep's edited duration, rounded to whole minutes"
                },
                "rep_latitude": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Latitude from the check-in or meeting path, preferring the start point"
                },
                "rep_longitude": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Longitude from the same path point as rep_latitude"
                },
                "site_status": {
                  "type": "string",
                  "enum": [
                    "On-site",
                    "Off-site"
                  ],
                  "description": "On-site below 0.5 miles from the contact. Off-site at 0.5 miles or more, or when distance is missing."
                }
              },
              "required": [
                "id",
                "interaction_type",
                "title",
                "notes",
                "created_at",
                "user",
                "contacts",
                "form_results",
                "ended_at",
                "reported_ended_at",
                "recorded_duration_minutes",
                "reported_duration_minutes",
                "rep_latitude",
                "rep_longitude",
                "site_status"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "interaction_count": {
                "type": "integer"
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of filter range"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "interaction_count",
              "start_date",
              "end_date"
            ]
          }
        },
        "required": [
          "contact",
          "included_contact_ids",
          "interactions",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get Contact Activity",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_contact_deals",
      "title": "Get Contact Deals",
      "description": "Load structured account deals with orders and line items for AI summarization. Use a contact_id from search_contacts (typically an account/place). Returns deals where that contact is the deal account. Returns up to 25 deals per call, newest updated first. If meta.has_more is true, you can call again with cursor set to meta.next_cursor to fetch the next older page if appropriate. You can repeat until meta.has_more is false to retrieve the full deals history, but more than the first page is not necessary if you were prompted to summarize recent deals for example.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "integer",
            "description": "Account/contact ID"
          },
          "start_date": {
            "type": "string",
            "description": "Start of deals updated_at date range (paired with end_date)"
          },
          "end_date": {
            "type": "string",
            "description": "End of deals updated_at date range (paired with start_date)"
          },
          "limit": {
            "type": "integer",
            "description": "Max deals returned per page. Default 25, max 25"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of older deals when meta.has_more is true."
          }
        },
        "required": [
          "contact_id"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contact_type": {
                "type": "string",
                "description": "place or person"
              }
            },
            "required": [
              "id",
              "name",
              "contact_type"
            ]
          },
          "deals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "amount": {
                  "type": "number"
                },
                "amount_owed": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "close_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 date"
                },
                "created_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_revenue": {
                  "type": "boolean"
                },
                "user": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Deal owner display name"
                },
                "lead_contact": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "orders": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "order_number": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "order_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "ISO8601 date"
                      },
                      "due_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "ISO8601 date"
                      },
                      "payment_term": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "memo": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "notes": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "subtotal": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "is_reserved": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "is_fulfilled": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "line_items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "quantity": {
                              "type": "number"
                            },
                            "price_per_unit": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "is_sample": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            },
                            "product_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "variant_label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sku": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "product_kit": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "components": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "product_name": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "variant_label": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "sku": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "product_name",
                                      "variant_label",
                                      "sku"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "name",
                                "description",
                                "components"
                              ]
                            },
                            "discounts": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "amount": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "discount_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "bogo_buy_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "bogo_get_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "kit_max_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "quantity_min_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "multiply_by_line_item_quantity": {
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "label",
                                  "amount",
                                  "discount_type",
                                  "bogo_buy_count",
                                  "bogo_get_count",
                                  "kit_max_count",
                                  "quantity_min_count",
                                  "multiply_by_line_item_quantity"
                                ]
                              }
                            }
                          },
                          "required": [
                            "label",
                            "quantity",
                            "price_per_unit",
                            "is_sample",
                            "product_name",
                            "variant_label",
                            "sku",
                            "product_kit",
                            "discounts"
                          ]
                        }
                      },
                      "discounts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "amount": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "discount_type": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "bogo_buy_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "bogo_get_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "kit_max_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "quantity_min_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "multiply_by_line_item_quantity": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "label",
                            "amount",
                            "discount_type",
                            "bogo_buy_count",
                            "bogo_get_count",
                            "kit_max_count",
                            "quantity_min_count",
                            "multiply_by_line_item_quantity"
                          ]
                        }
                      },
                      "taxes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "rate": {
                              "type": [
                                "number",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "rate"
                          ]
                        }
                      }
                    },
                    "required": [
                      "order_number",
                      "order_date",
                      "due_date",
                      "payment_term",
                      "memo",
                      "notes",
                      "subtotal",
                      "is_reserved",
                      "is_fulfilled",
                      "line_items",
                      "discounts",
                      "taxes"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "amount",
                "amount_owed",
                "notes",
                "close_date",
                "created_at",
                "updated_at",
                "status",
                "is_revenue",
                "user",
                "lead_contact",
                "orders"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "deal_count": {
                "type": "integer"
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of filter range"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "deal_count",
              "start_date",
              "end_date"
            ]
          }
        },
        "required": [
          "contact",
          "deals",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get Contact Deals",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "search_users",
      "title": "Search Users",
      "description": "Search accessible Outfield team members by name, title, role, email, or other profile data. Use a returned user id as user_id for get_user_activity. Admins can also use it for get_user_goals; non-admins can load only their own goals. If multiple users could match, ask the user to clarify before loading activity or goals. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to search the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Full-text user search query"
          },
          "limit": {
            "type": "integer",
            "description": "Max users returned. Default 10, max 25"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": [
          "query"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "organization_id": {
                  "type": "integer"
                },
                "organization_name": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "role": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_active": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "organization_id",
                "organization_name",
                "name",
                "title",
                "role",
                "is_active"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string"
              },
              "limit": {
                "type": "integer"
              },
              "result_count": {
                "type": "integer"
              },
              "truncated": {
                "type": "boolean"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "query",
              "limit",
              "result_count",
              "truncated",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "users",
          "meta"
        ]
      },
      "annotations": {
        "title": "Search Users",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_activity",
      "title": "Get User Activity",
      "description": "Load structured team-member activity for AI summarization. Returns up to 50 interactions per call, newest first. When the user asks for \"my activity\", omit user_id to load the authenticated user's activity. If meta.has_more is true, you can call again with cursor set to meta.next_cursor to fetch the next older page if appropriate. You can repeat until meta.has_more is false to retrieve the full activity history, but more than the first page is not necessary if you were prompted to summarize recent activity for example. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer",
            "description": "Team-member ID. Omit when the user asks for their own activity."
          },
          "interaction_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Limit to specific interaction IDs"
          },
          "start_date": {
            "type": "string",
            "description": "Start of activity date range (paired with end_date)"
          },
          "end_date": {
            "type": "string",
            "description": "End of activity date range (paired with start_date)"
          },
          "limit": {
            "type": "integer",
            "description": "Max interactions returned per page. Default 50, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of older interactions when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "type": "string"
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "title",
              "role",
              "is_active"
            ]
          },
          "interactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "interaction_type": {
                  "type": "string"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp"
                },
                "user": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Creator or owner display name"
                },
                "contacts": {
                  "type": "string",
                  "description": "Comma-joined contact names"
                },
                "form_results": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ended_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Actual end or check-out as an ISO8601 timestamp"
                },
                "reported_ended_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Recorded start (or interaction occurrence time when unavailable) plus reported duration as an ISO8601 timestamp"
                },
                "recorded_duration_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Elapsed time from recorded start to end, rounded to whole minutes"
                },
                "reported_duration_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Rep's edited duration, rounded to whole minutes"
                },
                "rep_latitude": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Latitude from the check-in or meeting path, preferring the start point"
                },
                "rep_longitude": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Longitude from the same path point as rep_latitude"
                },
                "site_status": {
                  "type": "string",
                  "enum": [
                    "On-site",
                    "Off-site"
                  ],
                  "description": "On-site below 0.5 miles from the contact. Off-site at 0.5 miles or more, or when distance is missing."
                }
              },
              "required": [
                "id",
                "interaction_type",
                "title",
                "notes",
                "created_at",
                "user",
                "contacts",
                "form_results",
                "ended_at",
                "reported_ended_at",
                "recorded_duration_minutes",
                "reported_duration_minutes",
                "rep_latitude",
                "rep_longitude",
                "site_status"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "interaction_count": {
                "type": "integer"
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of filter range"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "interaction_count",
              "start_date",
              "end_date",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "user",
          "interactions",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Activity",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_org_activity",
      "title": "Get Org Activity",
      "description": "Load structured team/organization activity for AI summarization. Use this when the user asks about their team's activity (for example, \"What has my team's activity been like this week?\"). For a single team member's activity, use get_user_activity instead. Returns up to 50 interactions per call, newest first. Pass start_date and end_date as an ISO date or datetime pair when the user names a time window such as this week. If the user names a form, call get_forms first and pass matching form IDs as form_ids; that includes interactions tagged with any version in each form's ancestry. If meta.has_more is true, you can call again with cursor set to meta.next_cursor to fetch the next older page if appropriate. You can repeat until meta.has_more is false to retrieve the full activity history, but more than the first page is not necessary if you were prompted to summarize recent activity for example. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "interaction_type": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Limit to these interaction types: check_in, meeting, note, task, progressed_deal, phone_call, email, text_message. Omit to include all allowed types."
          },
          "form_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Form IDs from get_forms. Matches interactions tagged with any form in each ID's ancestry (ancestors, self, and descendants). Max 50."
          },
          "start_date": {
            "type": "string",
            "description": "Start of activity date range (paired with end_date)"
          },
          "end_date": {
            "type": "string",
            "description": "End of activity date range (paired with start_date)"
          },
          "limit": {
            "type": "integer",
            "description": "Max interactions returned per page. Default 50, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of older interactions when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "interactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "interaction_type": {
                  "type": "string"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp"
                },
                "user": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Creator or owner display name"
                },
                "contacts": {
                  "type": "string",
                  "description": "Comma-joined contact names"
                },
                "form_results": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ended_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Actual end or check-out as an ISO8601 timestamp"
                },
                "reported_ended_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Recorded start (or interaction occurrence time when unavailable) plus reported duration as an ISO8601 timestamp"
                },
                "recorded_duration_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Elapsed time from recorded start to end, rounded to whole minutes"
                },
                "reported_duration_minutes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Rep's edited duration, rounded to whole minutes"
                },
                "rep_latitude": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Latitude from the check-in or meeting path, preferring the start point"
                },
                "rep_longitude": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Longitude from the same path point as rep_latitude"
                },
                "site_status": {
                  "type": "string",
                  "enum": [
                    "On-site",
                    "Off-site"
                  ],
                  "description": "On-site below 0.5 miles from the contact. Off-site at 0.5 miles or more, or when distance is missing."
                }
              },
              "required": [
                "id",
                "interaction_type",
                "title",
                "notes",
                "created_at",
                "user",
                "contacts",
                "form_results",
                "ended_at",
                "reported_ended_at",
                "recorded_duration_minutes",
                "reported_duration_minutes",
                "rep_latitude",
                "rep_longitude",
                "site_status"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "interaction_count": {
                "type": "integer"
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of filter range"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "interaction_count",
              "start_date",
              "end_date",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "interactions",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get Org Activity",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_incomplete_tasks",
      "title": "Get User Incomplete Tasks",
      "description": "Load structured incomplete tasks for a team member. When the user asks for \"my tasks\", omit user_id to load the authenticated user's tasks. Pass user_id only when they ask about another team member. Tasks are returned soonest first, up to 50 per call. If meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next page if appropriate. Use start_date and end_date together to answer questions such as tasks due this week. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer",
            "description": "Team-member ID. Omit when the user asks for their own tasks."
          },
          "interaction_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Limit to specific task interaction IDs"
          },
          "start_date": {
            "type": "string",
            "description": "Start of task date range (paired with end_date)"
          },
          "end_date": {
            "type": "string",
            "description": "End of task date range (paired with start_date)"
          },
          "limit": {
            "type": "integer",
            "description": "Max tasks returned per page. Default 50, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of upcoming tasks when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "type": "string"
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "title",
              "role",
              "is_active"
            ]
          },
          "tasks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "interaction_type": {
                  "type": "string"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp"
                },
                "user": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contacts": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "interaction_type",
                "title",
                "notes",
                "created_at",
                "user",
                "contacts"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "task_count": {
                "type": "integer"
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of filter range"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "task_count",
              "start_date",
              "end_date",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "user",
          "tasks",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Incomplete Tasks",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_calendar_events",
      "title": "Get User Calendar Events",
      "description": "Load structured scheduled calendar events for a team member. When the user asks for \"my calendar events\", omit user_id to load the authenticated user's events. Pass user_id only when they ask about another team member. By default, only current and upcoming incomplete events are returned (from the start of today onward), soonest first, up to 50 per call. Pass start_date and end_date together to include historical ranges or answer questions such as calendar events this week. If meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next page if appropriate. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer",
            "description": "Team-member ID. Omit when the user asks for their own calendar events."
          },
          "interaction_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Limit to specific calendar event interaction IDs"
          },
          "start_date": {
            "type": "string",
            "description": "Start of calendar event date range (paired with end_date)"
          },
          "end_date": {
            "type": "string",
            "description": "End of calendar event date range (paired with start_date)"
          },
          "limit": {
            "type": "integer",
            "description": "Max calendar events returned per page. Default 50, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of upcoming calendar events when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "type": "string"
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "title",
              "role",
              "is_active"
            ]
          },
          "calendar_events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "interaction_type": {
                  "type": "string"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "start_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp or date"
                },
                "end_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp or date"
                },
                "all_day": {
                  "type": "boolean"
                },
                "is_complete": {
                  "type": "boolean"
                },
                "user": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contacts": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "interaction_type",
                "title",
                "notes",
                "start_at",
                "end_at",
                "all_day",
                "is_complete",
                "user",
                "contacts"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "calendar_event_count": {
                "type": "integer"
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of filter range"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "calendar_event_count",
              "start_date",
              "end_date",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "user",
          "calendar_events",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Calendar Events",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_goals",
      "title": "Get User Goals",
      "description": "Load structured individual and combined goals for a team member, including progress for the goal period containing period_date. Omit period_date for the current period. For example, pass a date from last week to load weekly-goal progress for last week. When the user asks about \"my goals\", omit user_id to load the authenticated user's goals. Pass user_id only when an admin asks about another team member. Goals are returned in configured order, up to 50 per call. If meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next page. Use query to find a goal by name and goal_type to restrict results to individual or combined goals. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer",
            "description": "Team-member ID. Omit when the user asks about their own goals. Only admins may load another user's goals."
          },
          "query": {
            "type": "string",
            "description": "Case-insensitive goal name search"
          },
          "goal_type": {
            "type": "string",
            "description": "Goal type: individual or combined"
          },
          "period_date": {
            "type": "string",
            "description": "ISO date (YYYY-MM-DD) that selects the goal period used for progress_count. Omit for the current period."
          },
          "limit": {
            "type": "integer",
            "description": "Max goals returned per page. Default 50, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "type": "string"
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "title",
              "role",
              "is_active"
            ]
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "goal_type": {
                  "type": "string",
                  "description": "contact, individual, or combined"
                },
                "frequency": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "count": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Goal target"
                },
                "custom_due_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 date"
                },
                "created_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp"
                },
                "progress_count": {
                  "type": "number"
                },
                "id": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "name",
                "goal_type",
                "frequency",
                "count",
                "custom_due_date",
                "created_at",
                "progress_count"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "goal_count": {
                "type": "integer"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "goal_count",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "user",
          "goals",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Goals",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_goal_detail",
      "title": "Get User Goal Detail",
      "description": "Load an accessible team member goal with progress for its 12 most recent configured periods. Use get_user_goals first to identify the goal ID. Omit user_id for your own goals; only admins may request another team member. Omit end_period for the current period; provide an ISO date to end the history at the goal period containing that date. One-time goals return one progress value for their full created-at-through-due-date period. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "goal_id": {
            "type": "integer",
            "description": "Goal ID from get_user_goals"
          },
          "user_id": {
            "type": "integer",
            "description": "Team-member ID that owns the goal. Omit for your own goals. Only admins may use another user."
          },
          "end_period": {
            "type": "string",
            "description": "ISO date (YYYY-MM-DD) selecting the final goal period. Omit for the current period."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": [
          "goal_id"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "goal": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "goal_type": {
                "type": "string",
                "description": "contact, individual, or combined"
              },
              "frequency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "count": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Goal target"
              },
              "custom_due_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 date"
              },
              "created_at": {
                "type": "string",
                "description": "ISO8601 timestamp"
              },
              "id": {
                "type": "integer"
              },
              "progress_counts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period_date": {
                      "type": "string",
                      "description": "ISO8601 date selecting the goal period"
                    },
                    "progress_count": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "period_date",
                    "progress_count"
                  ]
                }
              }
            },
            "required": [
              "id",
              "name",
              "goal_type",
              "frequency",
              "count",
              "custom_due_date",
              "created_at",
              "progress_counts"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "goal",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Goal Detail",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_performance",
      "title": "Get User Performance",
      "description": "Load point totals by configured performance action for a user over a date range. Omit user_id when the user asks about their own performance. Pass user_id only when an admin asks about another user. Omit start_date and end_date to summarize the current week; otherwise, pass both dates to select an inclusive date range. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer",
            "description": "User ID. Omit when the user asks about their own performance. Only admins may load another user's performance."
          },
          "start_date": {
            "type": "string",
            "description": "Start of an inclusive performance date range. Must be provided with end_date."
          },
          "end_date": {
            "type": "string",
            "description": "End of an inclusive performance date range. Must be provided with start_date."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "type": "string"
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "title",
              "role",
              "is_active"
            ]
          },
          "point_system_specs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "point_count": {
                  "type": "number"
                },
                "point_system_spec": {
                  "type": "string",
                  "description": "Performance action name"
                },
                "category": {
                  "type": "string"
                }
              },
              "required": [
                "point_count",
                "point_system_spec",
                "category"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "start_date": {
                "type": "string",
                "description": "ISO8601 start of range"
              },
              "end_date": {
                "type": "string",
                "description": "ISO8601 end of range"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "start_date",
              "end_date",
              "organization_id",
              "organization_name"
            ]
          },
          "message": {
            "type": "string",
            "description": "Present when the user has no performance role"
          }
        },
        "required": [
          "user",
          "point_system_specs",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Performance",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_performance_roles_and_leaderboards",
      "title": "Get Performance Roles And Leaderboards",
      "description": "List performance roles and their leagues (gold/silver/bronze leaderboards) for the current user's enterprise. Each role includes id, name, and is_my_performance_role. Nested leagues include id, name, first_quarter_date, and is_my_league. Nested reward_pools include id, name, cadence, and pool_type. Use is_my_performance_role and is_my_league to answer \"Which league am I in?\" or \"What is my performance role?\". Pass a returned league id to get_user_matchups as league_id to load only that league's matchups, to get_user_leaderboards as league_id to rank that league by total performance points, or to get_user_calendar_quarter_rankings as league_id for that league's Standings. Pass a returned reward pool id to get_user_reward_pool_credit_rankings as pool_id; use cadence to choose the right pool for a period (monthly + period_offset 1 for last month). Users with only_my_performance_role see only their own role; others see all non-deleted roles in the enterprise.",
      "inputSchema": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "performance_roles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_my_performance_role": {
                  "type": "boolean"
                },
                "leagues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      },
                      "first_quarter_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "ISO8601 started_at of the league's earliest matchup"
                      },
                      "is_my_league": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "first_quarter_date",
                      "is_my_league"
                    ]
                  }
                },
                "reward_pools": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "cadence": {
                        "type": "string",
                        "description": "daily, weekly, monthly, quarterly, or yearly"
                      },
                      "pool_type": {
                        "type": "string",
                        "description": "percentage_split, winner_take_all, or ranked_split"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "cadence",
                      "pool_type"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "is_my_performance_role",
                "leagues",
                "reward_pools"
              ]
            }
          }
        },
        "required": [
          "performance_roles"
        ]
      },
      "annotations": {
        "title": "Get Performance Roles And Leaderboards",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_matchups",
      "title": "Get User Matchups",
      "description": "List league-play matchups for the current week (or a given date), including each matchup's league, performance role, teams, points, and nested user names. User roles see matchups in their performance-role leagues; admins see all enterprise leagues unless they have only_my_performance_role, in which case they see only their role. Omit matchup_date for today's matchups; pass an ISO date to select matchups whose started_at/ended_at window contains that date. Pass league_id from get_performance_roles_and_leaderboards to return only that league's matchups; omit it to keep the default league set. Returns up to 15 matchups per call, ordered by matchup ID. When meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next page. Use a nested user ID with get_user_matchup_detail for KPIs and daily hustle/diligence/preparation/leadership totals.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "matchup_date": {
            "type": "string",
            "description": "ISO date (YYYY-MM-DD) selecting matchups whose started_at/ended_at window contains this date. Omit for the current date's matchups."
          },
          "league_id": {
            "type": "integer",
            "description": "League id from get_performance_roles_and_leaderboards. When set, only matchups in that league are returned. Omit to include all leagues the user can access."
          },
          "limit": {
            "type": "integer",
            "description": "Max matchups returned per page. Default 15, max 15"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page when meta.has_more is true."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "matchups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "calendar_quarter": {
                  "type": "string"
                },
                "week": {
                  "type": "integer"
                },
                "started_at": {
                  "type": "string",
                  "description": "ISO8601 matchup start"
                },
                "ended_at": {
                  "type": "string",
                  "description": "ISO8601 matchup end"
                },
                "league_id": {
                  "type": "integer"
                },
                "league_name": {
                  "type": "string"
                },
                "performance_role_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_final": {
                  "type": "boolean"
                },
                "teams": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "performance_efficiency_rating": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "win_loss_tie_record": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "points": {
                        "type": "number"
                      },
                      "is_shadow": {
                        "type": "boolean"
                      },
                      "users": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "role": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "role"
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "title",
                      "performance_efficiency_rating",
                      "win_loss_tie_record",
                      "points",
                      "is_shadow",
                      "users"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "calendar_quarter",
                "week",
                "started_at",
                "ended_at",
                "league_id",
                "league_name",
                "performance_role_name",
                "is_final",
                "teams"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "matchup_count": {
                "type": "integer"
              },
              "matchup_date": {
                "type": "string",
                "description": "ISO8601 date used to select matchups"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "matchup_count",
              "matchup_date"
            ]
          }
        },
        "required": [
          "matchups",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Matchups",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_matchup_detail",
      "title": "Get User Matchup Detail",
      "description": "Load a user's current or historical league-play matchup with points, KPIs, and daily hustle/diligence/preparation/leadership totals. Use get_user_matchups first when the user asks about matchups in general (for example, \"How are the matchups looking this week?\"). Omit user_id when the user asks about their own matchup (for example, \"How am I doing in my current matchup?\"). Pass user_id for another teammate in the same performance-role leagues; admins may load any enterprise performance-role matchup unless they have only_my_performance_role. Omit matchup_date for today's matchup; pass an ISO date to select the matchup whose started_at/ended_at window contains that date.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer",
            "description": "User ID. Omit when the user asks about their own matchup. User roles can load teammates in their performance-role leagues; admins can load any enterprise matchup."
          },
          "matchup_date": {
            "type": "string",
            "description": "ISO date (YYYY-MM-DD) selecting the matchup whose started_at/ended_at window contains this date. Omit for the current date's matchup."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "type": "string"
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "title",
              "role",
              "is_active"
            ]
          },
          "matchup": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "integer"
              },
              "calendar_quarter": {
                "type": "string"
              },
              "week": {
                "type": "integer"
              },
              "started_at": {
                "type": "string",
                "description": "ISO8601 matchup start"
              },
              "ended_at": {
                "type": "string",
                "description": "ISO8601 matchup end"
              },
              "league_id": {
                "type": "integer"
              },
              "league_name": {
                "type": "string"
              },
              "is_final": {
                "type": "boolean"
              },
              "teams": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "organization_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "performance_efficiency_rating": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "win_loss_tie_record": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "points": {
                      "type": "number"
                    },
                    "is_shadow": {
                      "type": "boolean"
                    },
                    "last_six_matchup_results": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "role": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "role"
                        ]
                      }
                    },
                    "KPIs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "value": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ]
                      }
                    },
                    "days": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "days": {
                            "type": "integer"
                          },
                          "day_name": {
                            "type": "string"
                          },
                          "hustle": {
                            "type": "number"
                          },
                          "diligence": {
                            "type": "number"
                          },
                          "preparation": {
                            "type": "number"
                          },
                          "leadership": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "days",
                          "day_name",
                          "hustle",
                          "diligence",
                          "preparation",
                          "leadership"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "title",
                    "organization_name",
                    "performance_efficiency_rating",
                    "win_loss_tie_record",
                    "points",
                    "is_shadow",
                    "last_six_matchup_results",
                    "users",
                    "KPIs",
                    "days"
                  ]
                }
              }
            },
            "required": [
              "id",
              "calendar_quarter",
              "week",
              "started_at",
              "ended_at",
              "league_id",
              "league_name",
              "is_final",
              "teams"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "matchup_date": {
                "type": "string",
                "description": "ISO8601 date used to select the matchup"
              }
            },
            "required": [
              "matchup_date"
            ]
          },
          "message": {
            "type": "string",
            "description": "Present when no matchup exists for the user on the selected date"
          }
        },
        "required": [
          "user",
          "matchup",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Matchup Detail",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_leaderboards",
      "title": "Get User Leaderboards",
      "description": "Rank active user teams by total performance points for a date range. Omit start_date and end_date to rank the current week; pass both dates (for example the first and last day of this month) for another inclusive range. Pass league_id from get_performance_roles_and_leaderboards to rank a single league; omit it so users default to their own league and admins default to all enterprise leagues unless they have only_my_performance_role, in which case they also default to their own league. Returns up to 25 teams per call, ordered by total points. meta.my_team always includes the requester's team id, rank, and value even when that team is not on the current page. When meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next page. This tool does not support other leaderboard metrics such as check-in counts, point categories, goals, shadows, or all-time records.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "league_id": {
            "type": "integer",
            "description": "League id from get_performance_roles_and_leaderboards. When set, only teams in that league are ranked. Omit so users default to their own league and admins default to all leagues they can access."
          },
          "start_date": {
            "type": "string",
            "description": "Start of an inclusive points date range. Must be provided with end_date. Omit both dates to rank the current week."
          },
          "end_date": {
            "type": "string",
            "description": "End of an inclusive points date range. Must be provided with start_date. Omit both dates to rank the current week."
          },
          "limit": {
            "type": "integer",
            "description": "Max teams returned per page. Default 25, max 25"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page when meta.has_more is true."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "teams": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rank": {
                  "type": "integer"
                },
                "value": {
                  "type": "number"
                },
                "is_my_team": {
                  "type": "boolean"
                },
                "league_id": {
                  "type": "integer"
                },
                "league_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "users": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "role": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "role"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "title",
                "rank",
                "value",
                "is_my_team",
                "league_id",
                "league_name",
                "users"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "team_count": {
                "type": "integer"
              },
              "start_date": {
                "type": "string",
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": "string",
                "description": "ISO8601 end of filter range"
              },
              "league_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Selected league id; null when ranking across all allowed leagues"
              },
              "my_team": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "rank": {
                    "type": "integer"
                  },
                  "value": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "rank",
                  "value"
                ]
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "team_count",
              "start_date",
              "end_date",
              "league_id",
              "my_team"
            ]
          }
        },
        "required": [
          "teams",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Leaderboards",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_calendar_quarter_rankings",
      "title": "Get User Calendar Quarter Rankings",
      "description": "Rank active user teams in league Standings by win/loss/tie record for a calendar quarter (the same ranking as the Standings UI). This is not the points leaderboard; use get_user_leaderboards for total performance points. Standings are always for a single league: omit league_id so the requester defaults to their own league. There are no global standings; if the user has no league, the response is empty and explains why. Pass league_id from get_performance_roles_and_leaderboards to inspect another allowed league. Omit calendar_quarter_date for the current quarter; pass an ISO date in another quarter to rank that season. Returns up to 25 teams per call. meta.my_team always includes the requester's team id, rank, points value, and win/loss/tie record even when that team is not on the current page. When meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next page.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "league_id": {
            "type": "integer",
            "description": "League id from get_performance_roles_and_leaderboards. When set, only teams in that league are ranked. Omit to default to the requester's own league. There are no global standings."
          },
          "calendar_quarter_date": {
            "type": "string",
            "description": "ISO date (YYYY-MM-DD) in the calendar quarter to rank. Any date in the quarter works. Omit to rank the current quarter."
          },
          "limit": {
            "type": "integer",
            "description": "Max teams returned per page. Default 25, max 25"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page when meta.has_more is true."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "teams": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rank": {
                  "type": "integer"
                },
                "value": {
                  "type": "number",
                  "description": "Quarter performance points (tiebreaker)"
                },
                "win_loss_tie_record": {
                  "type": "string",
                  "description": "W - L - T record for the quarter"
                },
                "is_my_team": {
                  "type": "boolean"
                },
                "league_id": {
                  "type": "integer"
                },
                "league_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "users": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "role": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "role"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "title",
                "rank",
                "value",
                "win_loss_tie_record",
                "is_my_team",
                "league_id",
                "league_name",
                "users"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "team_count": {
                "type": "integer"
              },
              "calendar_quarter_date": {
                "type": "string",
                "description": "ISO date used to select the quarter"
              },
              "calendar_quarter": {
                "type": "string",
                "description": "Human-readable quarter, e.g. Jul - Sep 2026"
              },
              "league_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Selected league id; null when the user has no league"
              },
              "league_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "my_team": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "rank": {
                    "type": "integer"
                  },
                  "value": {
                    "type": "number"
                  },
                  "win_loss_tie_record": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "rank",
                  "value",
                  "win_loss_tie_record"
                ]
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "team_count",
              "calendar_quarter_date",
              "calendar_quarter",
              "league_id",
              "league_name",
              "my_team"
            ]
          },
          "message": {
            "type": "string",
            "description": "Present when standings cannot be ranked because the user has no league"
          }
        },
        "required": [
          "teams",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Calendar Quarter Rankings",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_reward_pool_credit_rankings",
      "title": "Get User Reward Pool Credit Rankings",
      "description": "Rank users in a Reward Pool by estimated or distributed reward credits. This is the same ranking as Reward Pools in League Play. Omit pool_id and period_offset to rank the requester's current default pool (the first active pool on their performance role) for the current period. Pass pool_id from get_performance_roles_and_leaderboards to rank a specific pool. period_offset is relative to the selected pool's cadence, not calendar months: 0 is the current in-progress period, 1 is the previous complete period. To answer \"last month\", choose a monthly pool from get_performance_roles_and_leaderboards (prefer is_my_performance_role) and pass period_offset 1. Users with only_my_performance_role can only rank pools on their own role; unrestricted admins can rank any enterprise pool they can see. Returns up to 25 users per call, ordered by estimated credits. meta.my_user always includes the requester's id, rank, eligible_points, share_percent, and estimated_credits even when that user is not on the current page. When meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next page.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "pool_id": {
            "type": "integer",
            "description": "Reward pool id from get_performance_roles_and_leaderboards. When set, that pool is ranked. Omit to default to the first active pool on the requester's performance role."
          },
          "period_offset": {
            "type": "integer",
            "description": "Non-negative number of cadence periods to look back, max 500. 0 (default) is the current period of the selected pool. 1 is the previous period of that pool's cadence (last month only when the pool is monthly)."
          },
          "limit": {
            "type": "integer",
            "description": "Max users returned per page. Default 25, max 25"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page when meta.has_more is true."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rank": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Pool rank/position by eligible points; null when the user has no eligible points. For ranked_split pools, equal-point ties are broken by created_at then user_id so users get distinct ranks (1, 2, ...) matching paid placement. Other pool types use a dense rank (tied points share a rank)."
                },
                "eligible_points": {
                  "type": "number"
                },
                "share_percent": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Share of the pool; null for winner-take-all or users with no share"
                },
                "estimated_credits": {
                  "type": "integer"
                },
                "is_my_user": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "title",
                "rank",
                "eligible_points",
                "share_percent",
                "estimated_credits",
                "is_my_user"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "user_count": {
                "type": "integer"
              },
              "pool_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Selected reward pool id"
              },
              "pool_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cadence": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "daily, weekly, monthly, quarterly, or yearly"
              },
              "pool_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "percentage_split, winner_take_all, or ranked_split"
              },
              "period_offset": {
                "type": "integer"
              },
              "period_start_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of the selected pool period"
              },
              "period_end_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of the selected pool period"
              },
              "period_label": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "my_user": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "rank": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Pool rank/position by eligible points; null when the user has no eligible points. For ranked_split pools, equal-point ties are broken by created_at then user_id so users get distinct ranks (1, 2, ...) matching paid placement. Other pool types use a dense rank (tied points share a rank)."
                  },
                  "eligible_points": {
                    "type": "number"
                  },
                  "share_percent": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "estimated_credits": {
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "rank",
                  "eligible_points",
                  "share_percent",
                  "estimated_credits"
                ]
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "user_count",
              "pool_id",
              "pool_name",
              "cadence",
              "pool_type",
              "period_offset",
              "period_start_at",
              "period_end_at",
              "period_label",
              "my_user"
            ]
          },
          "message": {
            "type": "string",
            "description": "Present when no pool is selectable, the pool is inactive for the period, or historical credits were not distributed"
          }
        },
        "required": [
          "users",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Reward Pool Credit Rankings",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_user_deals",
      "title": "Get User Deals",
      "description": "Load structured deals with orders and line items for a team member. Use this when the user asks about their deals (for example, \"How are my deals looking?\"). When the user asks for \"my deals\", omit user_id to load the authenticated user's deals. For a named teammate, call search_users first and pass that id as user_id. For team or organization-wide deals, use get_org_deals instead. Returns up to 25 deals per call, newest updated first. Pass start_date and end_date as an ISO date or datetime pair when the user names a time window such as this month; dates filter deals by updated_at. Use query to search deal name, notes, account, and related text. If meta.has_more is true, you can call again with cursor set to meta.next_cursor to fetch the next older page if appropriate. You can repeat until meta.has_more is false to retrieve the full deals history, but more than the first page is not necessary if you were prompted to summarize recent deals for example. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer",
            "description": "Team-member ID. Omit when the user asks for their own deals."
          },
          "query": {
            "type": "string",
            "description": "Full-text search across deal name, notes, account, and related text"
          },
          "start_date": {
            "type": "string",
            "description": "Start of deals updated_at date range (paired with end_date)"
          },
          "end_date": {
            "type": "string",
            "description": "End of deals updated_at date range (paired with start_date)"
          },
          "limit": {
            "type": "integer",
            "description": "Max deals returned per page. Default 25, max 25"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of older deals when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "type": "string"
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "title",
              "role",
              "is_active"
            ]
          },
          "deals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "amount": {
                  "type": "number"
                },
                "amount_owed": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "close_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 date"
                },
                "created_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_revenue": {
                  "type": "boolean"
                },
                "user": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Deal owner display name"
                },
                "lead_contact": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "orders": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "order_number": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "order_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "ISO8601 date"
                      },
                      "due_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "ISO8601 date"
                      },
                      "payment_term": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "memo": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "notes": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "subtotal": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "is_reserved": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "is_fulfilled": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "line_items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "quantity": {
                              "type": "number"
                            },
                            "price_per_unit": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "is_sample": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            },
                            "product_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "variant_label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sku": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "product_kit": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "components": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "product_name": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "variant_label": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "sku": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "product_name",
                                      "variant_label",
                                      "sku"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "name",
                                "description",
                                "components"
                              ]
                            },
                            "discounts": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "amount": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "discount_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "bogo_buy_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "bogo_get_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "kit_max_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "quantity_min_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "multiply_by_line_item_quantity": {
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "label",
                                  "amount",
                                  "discount_type",
                                  "bogo_buy_count",
                                  "bogo_get_count",
                                  "kit_max_count",
                                  "quantity_min_count",
                                  "multiply_by_line_item_quantity"
                                ]
                              }
                            }
                          },
                          "required": [
                            "label",
                            "quantity",
                            "price_per_unit",
                            "is_sample",
                            "product_name",
                            "variant_label",
                            "sku",
                            "product_kit",
                            "discounts"
                          ]
                        }
                      },
                      "discounts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "amount": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "discount_type": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "bogo_buy_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "bogo_get_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "kit_max_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "quantity_min_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "multiply_by_line_item_quantity": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "label",
                            "amount",
                            "discount_type",
                            "bogo_buy_count",
                            "bogo_get_count",
                            "kit_max_count",
                            "quantity_min_count",
                            "multiply_by_line_item_quantity"
                          ]
                        }
                      },
                      "taxes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "rate": {
                              "type": [
                                "number",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "rate"
                          ]
                        }
                      }
                    },
                    "required": [
                      "order_number",
                      "order_date",
                      "due_date",
                      "payment_term",
                      "memo",
                      "notes",
                      "subtotal",
                      "is_reserved",
                      "is_fulfilled",
                      "line_items",
                      "discounts",
                      "taxes"
                    ]
                  }
                },
                "account": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Deal account display name"
                }
              },
              "required": [
                "id",
                "name",
                "amount",
                "amount_owed",
                "notes",
                "close_date",
                "created_at",
                "updated_at",
                "status",
                "is_revenue",
                "user",
                "lead_contact",
                "orders",
                "account"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "deal_count": {
                "type": "integer"
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of filter range"
              },
              "query": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Full-text search query applied to this page"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "deal_count",
              "start_date",
              "end_date",
              "query",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "user",
          "deals",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get User Deals",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_org_deals",
      "title": "Get Org Deals",
      "description": "Load structured team/organization deals with orders and line items for AI summarization. Use this when the user asks about their team's deals (for example, \"How are my team's deals looking this month?\"). For a single team member's deals, use get_user_deals instead. Returns up to 25 deals per call, newest updated first. Pass start_date and end_date as an ISO date or datetime pair when the user names a time window such as this month; dates filter deals by updated_at. Use query to search deal name, notes, account, and related text. If meta.has_more is true, you can call again with cursor set to meta.next_cursor to fetch the next older page if appropriate. You can repeat until meta.has_more is false to retrieve the full deals history, but more than the first page is not necessary if you were prompted to summarize recent deals for example. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Full-text search across deal name, notes, account, and related text"
          },
          "start_date": {
            "type": "string",
            "description": "Start of deals updated_at date range (paired with end_date)"
          },
          "end_date": {
            "type": "string",
            "description": "End of deals updated_at date range (paired with start_date)"
          },
          "limit": {
            "type": "integer",
            "description": "Max deals returned per page. Default 25, max 25"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of older deals when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "deals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "amount": {
                  "type": "number"
                },
                "amount_owed": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "close_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 date"
                },
                "created_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 timestamp"
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_revenue": {
                  "type": "boolean"
                },
                "user": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Deal owner display name"
                },
                "lead_contact": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "orders": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "order_number": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "order_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "ISO8601 date"
                      },
                      "due_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "ISO8601 date"
                      },
                      "payment_term": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "memo": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "notes": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "subtotal": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "is_reserved": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "is_fulfilled": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "line_items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "quantity": {
                              "type": "number"
                            },
                            "price_per_unit": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "is_sample": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            },
                            "product_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "variant_label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sku": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "product_kit": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "components": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "product_name": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "variant_label": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "sku": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "product_name",
                                      "variant_label",
                                      "sku"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "name",
                                "description",
                                "components"
                              ]
                            },
                            "discounts": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "amount": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "discount_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "bogo_buy_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "bogo_get_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "kit_max_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "quantity_min_count": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ]
                                  },
                                  "multiply_by_line_item_quantity": {
                                    "type": [
                                      "boolean",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "label",
                                  "amount",
                                  "discount_type",
                                  "bogo_buy_count",
                                  "bogo_get_count",
                                  "kit_max_count",
                                  "quantity_min_count",
                                  "multiply_by_line_item_quantity"
                                ]
                              }
                            }
                          },
                          "required": [
                            "label",
                            "quantity",
                            "price_per_unit",
                            "is_sample",
                            "product_name",
                            "variant_label",
                            "sku",
                            "product_kit",
                            "discounts"
                          ]
                        }
                      },
                      "discounts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "amount": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "discount_type": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "bogo_buy_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "bogo_get_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "kit_max_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "quantity_min_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "multiply_by_line_item_quantity": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "label",
                            "amount",
                            "discount_type",
                            "bogo_buy_count",
                            "bogo_get_count",
                            "kit_max_count",
                            "quantity_min_count",
                            "multiply_by_line_item_quantity"
                          ]
                        }
                      },
                      "taxes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "rate": {
                              "type": [
                                "number",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "rate"
                          ]
                        }
                      }
                    },
                    "required": [
                      "order_number",
                      "order_date",
                      "due_date",
                      "payment_term",
                      "memo",
                      "notes",
                      "subtotal",
                      "is_reserved",
                      "is_fulfilled",
                      "line_items",
                      "discounts",
                      "taxes"
                    ]
                  }
                },
                "account": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Deal account display name"
                }
              },
              "required": [
                "id",
                "name",
                "amount",
                "amount_owed",
                "notes",
                "close_date",
                "created_at",
                "updated_at",
                "status",
                "is_revenue",
                "user",
                "lead_contact",
                "orders",
                "account"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "deal_count": {
                "type": "integer"
              },
              "start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 start of filter range"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO8601 end of filter range"
              },
              "query": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Full-text search query applied to this page"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "deal_count",
              "start_date",
              "end_date",
              "query",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "deals",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get Org Deals",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_deal_options",
      "title": "Get Deal Options",
      "description": "Load deal pipeline stages, catalog discounts, taxes, payment terms, and the calling user's deal-creation permissions. Call this before create_deal to choose deal_status_id, discount_id, tax_id, and to know whether the user can override prices, add one-off line items, or assign the deal to another user. Discounts with applies_to \"order\" belong on the order; \"line_item\" belong on a line item; \"both\" can be used in either place. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "deal_pipeline": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency_unit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency_code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "currency_unit",
              "currency_code"
            ]
          },
          "deal_statuses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "position": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "is_revenue": {
                  "type": "boolean"
                },
                "is_locked": {
                  "type": "boolean"
                },
                "lock_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reserves_inventory": {
                  "type": "boolean"
                },
                "fulfills_inventory": {
                  "type": "boolean"
                },
                "can_create_here": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "position",
                "is_revenue",
                "is_locked",
                "lock_type",
                "reserves_inventory",
                "fulfills_inventory",
                "can_create_here"
              ]
            }
          },
          "discounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "discount_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "bogo_buy_count": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "bogo_get_count": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "kit_max_count": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "quantity_min_count": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "multiply_by_line_item_quantity": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "id": {
                  "type": "integer"
                },
                "applies_to": {
                  "type": "string",
                  "description": "order, line_item, or both"
                },
                "product_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "product_category_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "product_variant_price_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "product_variant_price_kit_id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "label",
                "amount",
                "discount_type",
                "bogo_buy_count",
                "bogo_get_count",
                "kit_max_count",
                "quantity_min_count",
                "multiply_by_line_item_quantity",
                "id",
                "applies_to",
                "product_id",
                "product_category_id",
                "product_variant_price_id",
                "product_variant_price_kit_id"
              ]
            }
          },
          "taxes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "region": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rate": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "tax_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_inclusive": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "region",
                "rate",
                "tax_type",
                "is_inclusive"
              ]
            }
          },
          "payment_terms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "type": "object",
            "properties": {
              "can_change_order_pricing": {
                "type": "boolean"
              },
              "can_create_one_off_line_items": {
                "type": "boolean"
              },
              "can_create_one_off_discounts": {
                "type": "boolean"
              },
              "requires_deal_account": {
                "type": "boolean"
              },
              "can_assign_other_users": {
                "type": "boolean"
              },
              "can_exceed_quantity_available": {
                "type": "boolean"
              },
              "can_exceed_quantity_on_hand": {
                "type": "boolean"
              },
              "can_edit_locked_deals": {
                "type": "boolean"
              }
            },
            "required": [
              "can_change_order_pricing",
              "can_create_one_off_line_items",
              "can_create_one_off_discounts",
              "requires_deal_account",
              "can_assign_other_users",
              "can_exceed_quantity_available",
              "can_exceed_quantity_on_hand",
              "can_edit_locked_deals"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              },
              "deal_status_count": {
                "type": "integer"
              },
              "discount_count": {
                "type": "integer"
              },
              "tax_count": {
                "type": "integer"
              },
              "discounts_has_more": {
                "type": "boolean"
              },
              "taxes_has_more": {
                "type": "boolean"
              }
            },
            "required": [
              "organization_id",
              "organization_name",
              "deal_status_count",
              "discount_count",
              "tax_count",
              "discounts_has_more",
              "taxes_has_more"
            ]
          }
        },
        "required": [
          "deal_pipeline",
          "deal_statuses",
          "discounts",
          "taxes",
          "payment_terms",
          "permissions",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get Deal Options",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_inventory",
      "title": "Get Inventory",
      "description": "Load active product-variant inventory, including the variant id, the primary product_variant_price id, SKU, available and on-hand quantities, pricing, and case size. Use product_variant_price.id as product_variant_price_id when calling create_deal. Quantity on a deal line item is in cases when case_size is greater than 1; quantity_available is in single units. Additional prices on the same variant appear in additional_product_variant_prices. Use query to locate a product by product name, variant label, SKU, or other indexed product details. Returns up to 50 variants per call, newest first. If meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next older page if appropriate. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Full-text product, variant, SKU, and price search query"
          },
          "stock": {
            "type": "string",
            "description": "Restrict results to low_stock, out_of_stock, or in_stock"
          },
          "limit": {
            "type": "integer",
            "description": "Max product variants returned per page. Default 50, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of older product variants when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "product_variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp"
                },
                "parent_product": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "description"
                  ]
                },
                "product_variant_price": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sku": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "quantity_on_hand": {
                      "type": "number"
                    },
                    "quantity_available": {
                      "type": "number"
                    },
                    "retail_price": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "case_size": {
                      "type": "integer"
                    },
                    "internal_cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "sku",
                    "quantity_on_hand",
                    "quantity_available",
                    "retail_price",
                    "case_size",
                    "internal_cost"
                  ]
                },
                "additional_product_variant_prices": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "label": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "sku": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "retail_price": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "case_size": {
                        "type": "integer"
                      },
                      "quantity_on_hand": {
                        "type": "number"
                      },
                      "quantity_available": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "sku",
                      "retail_price",
                      "case_size",
                      "quantity_on_hand",
                      "quantity_available"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "label",
                "description",
                "created_at",
                "parent_product",
                "product_variant_price",
                "additional_product_variant_prices"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "product_variant_count": {
                "type": "integer"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "product_variant_count",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "product_variants",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get Inventory",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_product_kits",
      "title": "Get Product Kits",
      "description": "Load product variant price kits for creating deal line items. Use kit id as product_variant_price_kit_id in create_deal. Kit quantity_available is the number of complete kits that can be sold from component stock. Returns up to 50 kits per call, newest first. If meta.has_more is true, call again with cursor set to meta.next_cursor. Use query to match kit name or description. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to use the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Search kit name or description"
          },
          "limit": {
            "type": "integer",
            "description": "Max kits returned per page. Default 50, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page of older kits when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "product_kits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retail_price": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "kit_quantity_available": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "kit_quantity_on_hand": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "components": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "product_variant_price_id": {
                        "type": "integer"
                      },
                      "product_name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "variant_label": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "sku": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "retail_price": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "case_size": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "product_variant_price_id",
                      "product_name",
                      "variant_label",
                      "sku",
                      "retail_price",
                      "case_size"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "retail_price",
                "kit_quantity_available",
                "kit_quantity_on_hand",
                "components"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "product_kit_count": {
                "type": "integer"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "product_kit_count",
              "organization_id",
              "organization_name"
            ]
          }
        },
        "required": [
          "product_kits",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get Product Kits",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "create_deal",
      "title": "Create Deal",
      "description": "Create a deal, optionally with a single nested order. Workflow: search_contacts for account_id (place or person) and optional lead_contact_id (person only); get_deal_options for deal_status_id, discount_id, tax_id, payment terms, and permissions; get_inventory for product_variant_price_id (use product_variant_price.id, not SKU); get_product_kits for product_variant_price_kit_id. Quantity on catalog line items is in cases when case_size is greater than 1. price_per_unit defaults to the catalog retail price; overriding it requires can_change_order_pricing. An order may have at most one discount and one tax; a line item may have at most one discount. Use existing discount_id/tax_id from get_deal_options, or inline fields when can_create_one_off_discounts is true. One-off line items (label only) require can_create_one_off_line_items. Creating in a reserving or fulfilling stage deducts inventory. When there is no order, pass amount as the deal value. Pass idempotency_key to prevent duplicate creates on retry. Zero-inventory and unintegrated-variant filters used in the web UI are not applied here. If the user names a team, call get_user_profile first and pass organization_id.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Deal name. Defaults to the account name when omitted"
          },
          "notes": {
            "type": "string",
            "description": "Deal notes"
          },
          "amount": {
            "type": [
              "null",
              "number"
            ],
            "description": "Deal amount when there is no order. Ignored when an order is provided because the total is calculated from line items"
          },
          "close_date": {
            "type": "string",
            "description": "ISO8601 close date used for revenue attribution"
          },
          "account_id": {
            "type": "integer",
            "description": "Account contact ID from search_contacts (place or person)"
          },
          "lead_contact_id": {
            "type": "integer",
            "description": "Person contact ID from search_contacts"
          },
          "deal_status_id": {
            "type": "integer",
            "description": "Pipeline stage ID from get_deal_options. Defaults to the first stage"
          },
          "user_id": {
            "type": "integer",
            "description": "Deal owner user ID from search_users. Defaults to the calling user. Admins and managers can assign others"
          },
          "order": {
            "type": "object",
            "properties": {
              "order_date": {
                "type": "string",
                "description": "ISO8601 order date"
              },
              "due_date": {
                "type": "string",
                "description": "ISO8601 due date"
              },
              "payment_term": {
                "type": "string",
                "description": "Payment term from get_deal_options.payment_terms, or a custom term"
              },
              "memo": {
                "type": "string"
              },
              "notes": {
                "type": "string",
                "description": "Deal notes"
              },
              "bill_to": {
                "type": "string",
                "description": "Billing text. Defaults to the account address when omitted"
              },
              "payment_instructions": {
                "type": "string"
              },
              "line_items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "product_variant_price_id": {
                      "type": "integer",
                      "description": "ID from get_inventory product_variant_price.id"
                    },
                    "product_variant_price_kit_id": {
                      "type": "integer",
                      "description": "ID from get_product_kits"
                    },
                    "label": {
                      "type": "string",
                      "description": "Required for one-off line items with no catalog product"
                    },
                    "quantity": {
                      "type": "number",
                      "description": "Quantity in cases when the product case_size is greater than 1"
                    },
                    "price_per_unit": {
                      "type": [
                        "null",
                        "number"
                      ],
                      "description": "Defaults to catalog retail_price. Override requires can_change_order_pricing"
                    },
                    "is_sample": {
                      "type": "boolean"
                    },
                    "discount": {
                      "type": "object",
                      "properties": {
                        "discount_id": {
                          "type": "integer",
                          "description": "Existing discount ID from get_deal_options, including BOGO, kit, and quantity discounts"
                        },
                        "label": {
                          "type": "string"
                        },
                        "discount_type": {
                          "type": "string",
                          "description": "One-off line-item discounts must be percentage or fixed"
                        },
                        "amount": {
                          "type": [
                            "null",
                            "number"
                          ],
                          "description": "Deal amount when there is no order. Ignored when an order is provided because the total is calculated from line items"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "quantity"
                  ]
                }
              },
              "discount": {
                "type": "object",
                "properties": {
                  "discount_id": {
                    "type": "integer",
                    "description": "Existing order-level discount ID from get_deal_options"
                  },
                  "label": {
                    "type": "string"
                  },
                  "discount_type": {
                    "type": "string"
                  },
                  "amount": {
                    "type": [
                      "null",
                      "number"
                    ],
                    "description": "Deal amount when there is no order. Ignored when an order is provided because the total is calculated from line items"
                  }
                },
                "required": []
              },
              "tax": {
                "type": "object",
                "properties": {
                  "tax_id": {
                    "type": "integer",
                    "description": "Existing tax ID from get_deal_options"
                  },
                  "name": {
                    "type": "string",
                    "description": "Deal name. Defaults to the account name when omitted"
                  },
                  "tax_type": {
                    "type": "string"
                  },
                  "rate": {
                    "type": [
                      "null",
                      "number"
                    ]
                  },
                  "region": {
                    "type": "string"
                  }
                },
                "required": []
              }
            },
            "required": []
          },
          "idempotency_key": {
            "type": "string",
            "description": "Client retry key; replays the original result for 24 hours"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "number"
          },
          "amount_owed": {
            "type": [
              "number",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "close_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 date"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 timestamp"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 timestamp"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_revenue": {
            "type": "boolean"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Deal owner display name"
          },
          "lead_contact": {
            "type": [
              "string",
              "null"
            ]
          },
          "orders": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "order_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "order_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 date"
                },
                "due_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO8601 date"
                },
                "payment_term": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "memo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "subtotal": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "is_reserved": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "is_fulfilled": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "line_items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "quantity": {
                        "type": "number"
                      },
                      "price_per_unit": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "is_sample": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "product_name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "variant_label": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "sku": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "product_kit": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "components": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "product_name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "variant_label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "sku": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "product_name",
                                "variant_label",
                                "sku"
                              ]
                            }
                          }
                        },
                        "required": [
                          "name",
                          "description",
                          "components"
                        ]
                      },
                      "discounts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "amount": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "discount_type": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "bogo_buy_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "bogo_get_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "kit_max_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "quantity_min_count": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "multiply_by_line_item_quantity": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "label",
                            "amount",
                            "discount_type",
                            "bogo_buy_count",
                            "bogo_get_count",
                            "kit_max_count",
                            "quantity_min_count",
                            "multiply_by_line_item_quantity"
                          ]
                        }
                      }
                    },
                    "required": [
                      "label",
                      "quantity",
                      "price_per_unit",
                      "is_sample",
                      "product_name",
                      "variant_label",
                      "sku",
                      "product_kit",
                      "discounts"
                    ]
                  }
                },
                "discounts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "amount": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "discount_type": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "bogo_buy_count": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "bogo_get_count": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "kit_max_count": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "quantity_min_count": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "multiply_by_line_item_quantity": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "label",
                      "amount",
                      "discount_type",
                      "bogo_buy_count",
                      "bogo_get_count",
                      "kit_max_count",
                      "quantity_min_count",
                      "multiply_by_line_item_quantity"
                    ]
                  }
                },
                "taxes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "rate": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "rate"
                    ]
                  }
                },
                "id": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "total": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Order total after discounts and taxes"
                }
              },
              "required": [
                "order_number",
                "order_date",
                "due_date",
                "payment_term",
                "memo",
                "notes",
                "subtotal",
                "is_reserved",
                "is_fulfilled",
                "line_items",
                "discounts",
                "taxes",
                "id",
                "total"
              ]
            }
          },
          "deal_status_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currency_unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "account": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "deduplicated": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "amount",
          "amount_owed",
          "notes",
          "close_date",
          "created_at",
          "updated_at",
          "status",
          "is_revenue",
          "user",
          "lead_contact",
          "orders",
          "deal_status_id",
          "user_id",
          "currency_unit",
          "account",
          "deduplicated",
          "warnings"
        ]
      },
      "annotations": {
        "title": "Create Deal",
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read",
            "ai:write"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read",
              "ai:write"
            ]
          }
        ]
      }
    },
    {
      "name": "get_forms",
      "title": "Get Forms",
      "description": "List the current active version of accessible Outfield forms, including each form's ID, title, required status, creation date, and field count. Every listed form can be attached to check-ins, meetings, phone calls, and calendar events. Honor is_required forms and meta.min_forms_required_per_interaction (check-ins and meetings) or meta.min_forms_required_per_phone_call (phone calls) when logging those interactions. Returns up to 50 forms per call, alphabetically by title. When meta.has_more is true, call again with cursor set to meta.next_cursor to fetch the next page. Use a returned form ID with get_form_detail to inspect its fields and conditions. If the user names a team, call get_user_profile first and pass organization_id. Omit organization_id to list the current organization.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Max forms returned per page. Default 50, max 50"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from a previous response's meta.next_cursor. Pass this to fetch the next page when meta.has_more is true."
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "forms": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "organization_id": {
                  "type": "integer"
                },
                "organization_name": {
                  "type": "string"
                },
                "root_form_id": {
                  "type": "integer"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "is_required": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "description": "ISO8601 timestamp"
                },
                "form_field_count": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "organization_id",
                "organization_name",
                "root_form_id",
                "title",
                "is_active",
                "is_required",
                "created_at",
                "form_field_count"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque cursor for the next page; null when has_more is false"
              },
              "form_count": {
                "type": "integer"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              },
              "min_forms_required_per_interaction": {
                "type": "integer"
              },
              "min_forms_required_per_phone_call": {
                "type": "integer"
              }
            },
            "required": [
              "limit",
              "has_more",
              "next_cursor",
              "form_count",
              "organization_id",
              "organization_name",
              "min_forms_required_per_interaction",
              "min_forms_required_per_phone_call"
            ]
          }
        },
        "required": [
          "forms",
          "meta"
        ]
      },
      "annotations": {
        "title": "Get Forms",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "get_form_detail",
      "title": "Get Form Detail",
      "description": "Load structured details for an accessible Outfield form, including every form field, choices, options, ordering, KPI settings, and conditional field relationships. Every form can be attached to check-ins, meetings, phone calls, and calendar events. Use field ids and field_type rules when filling form_entries on create_check_in, create_meeting, or create_phone_call. Use get_forms first to resolve a form ID. Form IDs work across organizations the user belongs to.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "form_id": {
            "type": "integer",
            "description": "Form ID"
          }
        },
        "required": [
          "form_id"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "form": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "organization_id": {
                "type": "integer"
              },
              "organization_name": {
                "type": "string"
              },
              "root_form_id": {
                "type": "integer"
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "is_required": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "description": "ISO8601 timestamp"
              },
              "form_field_count": {
                "type": "integer"
              },
              "form_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "root_form_field_id": {
                      "type": "integer"
                    },
                    "field_type": {
                      "type": "string"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "is_required": {
                      "type": "boolean"
                    },
                    "choices": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "created_at": {
                      "type": "string",
                      "description": "ISO8601 timestamp"
                    },
                    "options": {},
                    "position": {
                      "type": "integer"
                    },
                    "units": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "is_kpi": {
                      "type": "boolean"
                    },
                    "is_conditional": {
                      "type": "boolean"
                    },
                    "child_conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "form_entry_trigger": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "comparison_type": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "action": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parent_form_field_id": {
                            "type": "integer"
                          },
                          "child_form_field_id": {
                            "type": "integer"
                          },
                          "created_at": {
                            "type": "string",
                            "description": "ISO8601 timestamp"
                          }
                        },
                        "required": [
                          "id",
                          "form_entry_trigger",
                          "comparison_type",
                          "action",
                          "parent_form_field_id",
                          "child_form_field_id",
                          "created_at"
                        ]
                      }
                    },
                    "parent_conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "form_entry_trigger": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "comparison_type": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "action": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parent_form_field_id": {
                            "type": "integer"
                          },
                          "child_form_field_id": {
                            "type": "integer"
                          },
                          "created_at": {
                            "type": "string",
                            "description": "ISO8601 timestamp"
                          }
                        },
                        "required": [
                          "id",
                          "form_entry_trigger",
                          "comparison_type",
                          "action",
                          "parent_form_field_id",
                          "child_form_field_id",
                          "created_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "root_form_field_id",
                    "field_type",
                    "label",
                    "is_required",
                    "choices",
                    "created_at",
                    "options",
                    "position",
                    "units",
                    "is_kpi",
                    "is_conditional",
                    "child_conditions",
                    "parent_conditions"
                  ]
                }
              }
            },
            "required": [
              "id",
              "organization_id",
              "organization_name",
              "root_form_id",
              "title",
              "is_active",
              "is_required",
              "created_at",
              "form_field_count",
              "form_fields"
            ]
          }
        },
        "required": [
          "form"
        ]
      },
      "annotations": {
        "title": "Get Form Detail",
        "readOnlyHint": true,
        "openWorldHint": false,
        "destructiveHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read"
            ]
          }
        ]
      }
    },
    {
      "name": "create_check_in",
      "title": "Create Check In",
      "description": "Log a completed check-in at a place (account). Requires contact_ids of place contacts from search_contacts (contact_type=place). GPS location cannot be captured from ChatGPT or Claude. Do not invent coordinates. duration_minutes is reported duration only; recorded duration is not available. Form values must use field ids from get_form_detail. choice_list is one string from choices; checklist is an array of selected choice strings; checkbox is true or false; number_field is a number; text_field and text_area are strings. Do not send signature, photo, add_task, add_calendar_event, add_deal, or add_contact fields. Call get_forms then get_form_detail before attaching forms. Every listed form can be attached to check-ins, meetings, phone calls, and calendar events. Honor is_required forms and meta.min_forms_required_per_interaction (check-ins/meetings) or meta.min_forms_required_per_phone_call (phone calls). Optional idempotency_key prevents duplicate creates if the client retries.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Place (account) contact IDs from search_contacts"
          },
          "notes": {
            "type": "string",
            "description": "Notes for the check-in"
          },
          "title": {
            "type": "string",
            "description": "Optional title"
          },
          "occurred_at": {
            "type": "string",
            "description": "When the check-in happened (ISO8601). Defaults to now. Cannot be in the future."
          },
          "duration_minutes": {
            "type": "integer",
            "description": "Reported duration in minutes"
          },
          "form_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Form IDs from get_forms to attach"
          },
          "form_entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "form_id": {
                  "type": "integer"
                },
                "entries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "id"
                    ]
                  }
                }
              },
              "required": [
                "form_id"
              ]
            }
          },
          "idempotency_key": {
            "type": "string",
            "description": "Client retry key; replays the original result for 24 hours"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": [
          "contact_ids"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "interaction_type": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO8601 timestamp"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creator or owner display name"
          },
          "contacts": {
            "type": "string",
            "description": "Comma-joined contact names"
          },
          "form_results": {
            "type": [
              "string",
              "null"
            ]
          },
          "reported_duration_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "call_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 due datetime for tasks"
          },
          "is_complete": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 start for calendar events"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 end for calendar events"
          },
          "location_recorded": {
            "type": "boolean"
          },
          "deduplicated": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "interaction_type",
          "title",
          "notes",
          "created_at",
          "user",
          "contacts",
          "form_results",
          "reported_duration_seconds",
          "call_result",
          "due_at",
          "is_complete",
          "starts_at",
          "ends_at",
          "location_recorded",
          "deduplicated",
          "warnings"
        ]
      },
      "annotations": {
        "title": "Create Check In",
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read",
            "ai:write"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read",
              "ai:write"
            ]
          }
        ]
      }
    },
    {
      "name": "create_meeting",
      "title": "Create Meeting",
      "description": "Log a completed meeting with a person. Requires contact_ids of person contacts from search_contacts (contact_type=person). GPS location cannot be captured from ChatGPT or Claude. Do not invent coordinates. duration_minutes is reported duration only; recorded duration is not available. Form values must use field ids from get_form_detail. choice_list is one string from choices; checklist is an array of selected choice strings; checkbox is true or false; number_field is a number; text_field and text_area are strings. Do not send signature, photo, add_task, add_calendar_event, add_deal, or add_contact fields. Call get_forms then get_form_detail before attaching forms. Every listed form can be attached to check-ins, meetings, phone calls, and calendar events. Honor is_required forms and meta.min_forms_required_per_interaction (check-ins/meetings) or meta.min_forms_required_per_phone_call (phone calls). Optional idempotency_key prevents duplicate creates if the client retries.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Person contact IDs from search_contacts"
          },
          "notes": {
            "type": "string",
            "description": "Notes for the meeting"
          },
          "title": {
            "type": "string",
            "description": "Optional title"
          },
          "occurred_at": {
            "type": "string",
            "description": "When the meeting happened (ISO8601). Defaults to now. Cannot be in the future."
          },
          "duration_minutes": {
            "type": "integer",
            "description": "Reported duration in minutes"
          },
          "form_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Form IDs from get_forms to attach"
          },
          "form_entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "form_id": {
                  "type": "integer"
                },
                "entries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "id"
                    ]
                  }
                }
              },
              "required": [
                "form_id"
              ]
            }
          },
          "idempotency_key": {
            "type": "string",
            "description": "Client retry key; replays the original result for 24 hours"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": [
          "contact_ids"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "interaction_type": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO8601 timestamp"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creator or owner display name"
          },
          "contacts": {
            "type": "string",
            "description": "Comma-joined contact names"
          },
          "form_results": {
            "type": [
              "string",
              "null"
            ]
          },
          "reported_duration_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "call_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 due datetime for tasks"
          },
          "is_complete": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 start for calendar events"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 end for calendar events"
          },
          "location_recorded": {
            "type": "boolean"
          },
          "deduplicated": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "interaction_type",
          "title",
          "notes",
          "created_at",
          "user",
          "contacts",
          "form_results",
          "reported_duration_seconds",
          "call_result",
          "due_at",
          "is_complete",
          "starts_at",
          "ends_at",
          "location_recorded",
          "deduplicated",
          "warnings"
        ]
      },
      "annotations": {
        "title": "Create Meeting",
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read",
            "ai:write"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read",
              "ai:write"
            ]
          }
        ]
      }
    },
    {
      "name": "create_phone_call",
      "title": "Create Phone Call",
      "description": "Log a completed phone call. Requires contact_ids and call_result (answered, did_not_answer, left_a_voicemail, left_a_message_with_someone_else, or invalid_phone_number). Duration is reported duration_minutes only. Form values must use field ids from get_form_detail. choice_list is one string from choices; checklist is an array of selected choice strings; checkbox is true or false; number_field is a number; text_field and text_area are strings. Do not send signature, photo, add_task, add_calendar_event, add_deal, or add_contact fields. Call get_forms then get_form_detail before attaching forms. Every listed form can be attached to check-ins, meetings, phone calls, and calendar events. Honor is_required forms and meta.min_forms_required_per_interaction (check-ins/meetings) or meta.min_forms_required_per_phone_call (phone calls). Optional idempotency_key prevents duplicate creates if the client retries.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Contact IDs from search_contacts"
          },
          "call_result": {
            "type": "string",
            "description": "One of answered, did_not_answer, left_a_voicemail, left_a_message_with_someone_else, invalid_phone_number"
          },
          "notes": {
            "type": "string",
            "description": "Notes for the phone call"
          },
          "title": {
            "type": "string",
            "description": "Optional title"
          },
          "occurred_at": {
            "type": "string",
            "description": "When the call happened (ISO8601). Defaults to now. Cannot be in the future."
          },
          "duration_minutes": {
            "type": "integer",
            "description": "Reported duration in minutes"
          },
          "form_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Form IDs from get_forms to attach"
          },
          "form_entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "form_id": {
                  "type": "integer"
                },
                "entries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "id"
                    ]
                  }
                }
              },
              "required": [
                "form_id"
              ]
            }
          },
          "idempotency_key": {
            "type": "string",
            "description": "Client retry key; replays the original result for 24 hours"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": [
          "contact_ids",
          "call_result"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "interaction_type": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO8601 timestamp"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creator or owner display name"
          },
          "contacts": {
            "type": "string",
            "description": "Comma-joined contact names"
          },
          "form_results": {
            "type": [
              "string",
              "null"
            ]
          },
          "reported_duration_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "call_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 due datetime for tasks"
          },
          "is_complete": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 start for calendar events"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 end for calendar events"
          },
          "location_recorded": {
            "type": "boolean"
          },
          "deduplicated": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "interaction_type",
          "title",
          "notes",
          "created_at",
          "user",
          "contacts",
          "form_results",
          "reported_duration_seconds",
          "call_result",
          "due_at",
          "is_complete",
          "starts_at",
          "ends_at",
          "location_recorded",
          "deduplicated",
          "warnings"
        ]
      },
      "annotations": {
        "title": "Create Phone Call",
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read",
            "ai:write"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read",
              "ai:write"
            ]
          }
        ]
      }
    },
    {
      "name": "create_email",
      "title": "Create Email",
      "description": "Log an email interaction with one or more contacts. Forms cannot be attached. Optional idempotency_key prevents duplicate creates if the client retries.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Contact IDs from search_contacts"
          },
          "title": {
            "type": "string",
            "description": "Email subject or title"
          },
          "notes": {
            "type": "string",
            "description": "Email body or notes"
          },
          "occurred_at": {
            "type": "string",
            "description": "When the email happened (ISO8601). Defaults to now. Cannot be in the future."
          },
          "idempotency_key": {
            "type": "string",
            "description": "Client retry key; replays the original result for 24 hours"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": [
          "contact_ids"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "interaction_type": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO8601 timestamp"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creator or owner display name"
          },
          "contacts": {
            "type": "string",
            "description": "Comma-joined contact names"
          },
          "form_results": {
            "type": [
              "string",
              "null"
            ]
          },
          "reported_duration_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "call_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 due datetime for tasks"
          },
          "is_complete": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 start for calendar events"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 end for calendar events"
          },
          "location_recorded": {
            "type": "boolean"
          },
          "deduplicated": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "interaction_type",
          "title",
          "notes",
          "created_at",
          "user",
          "contacts",
          "form_results",
          "reported_duration_seconds",
          "call_result",
          "due_at",
          "is_complete",
          "starts_at",
          "ends_at",
          "location_recorded",
          "deduplicated",
          "warnings"
        ]
      },
      "annotations": {
        "title": "Create Email",
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read",
            "ai:write"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read",
              "ai:write"
            ]
          }
        ]
      }
    },
    {
      "name": "create_text_message",
      "title": "Create Text Message",
      "description": "Log a text message interaction with one or more contacts. Forms cannot be attached. Optional idempotency_key prevents duplicate creates if the client retries.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Contact IDs from search_contacts"
          },
          "title": {
            "type": "string",
            "description": "Optional title"
          },
          "notes": {
            "type": "string",
            "description": "Message body or notes"
          },
          "occurred_at": {
            "type": "string",
            "description": "When the message happened (ISO8601). Defaults to now. Cannot be in the future."
          },
          "idempotency_key": {
            "type": "string",
            "description": "Client retry key; replays the original result for 24 hours"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": [
          "contact_ids"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "interaction_type": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO8601 timestamp"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creator or owner display name"
          },
          "contacts": {
            "type": "string",
            "description": "Comma-joined contact names"
          },
          "form_results": {
            "type": [
              "string",
              "null"
            ]
          },
          "reported_duration_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "call_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 due datetime for tasks"
          },
          "is_complete": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 start for calendar events"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 end for calendar events"
          },
          "location_recorded": {
            "type": "boolean"
          },
          "deduplicated": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "interaction_type",
          "title",
          "notes",
          "created_at",
          "user",
          "contacts",
          "form_results",
          "reported_duration_seconds",
          "call_result",
          "due_at",
          "is_complete",
          "starts_at",
          "ends_at",
          "location_recorded",
          "deduplicated",
          "warnings"
        ]
      },
      "annotations": {
        "title": "Create Text Message",
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read",
            "ai:write"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read",
              "ai:write"
            ]
          }
        ]
      }
    },
    {
      "name": "create_note",
      "title": "Create Note",
      "description": "Create a note on one or more contacts. Forms cannot be attached. Optional idempotency_key prevents duplicate creates if the client retries.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Contact IDs from search_contacts"
          },
          "title": {
            "type": "string",
            "description": "Optional title"
          },
          "notes": {
            "type": "string",
            "description": "Note body"
          },
          "occurred_at": {
            "type": "string",
            "description": "When the note is for (ISO8601). Defaults to now. Cannot be in the future."
          },
          "idempotency_key": {
            "type": "string",
            "description": "Client retry key; replays the original result for 24 hours"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": [
          "contact_ids"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "interaction_type": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO8601 timestamp"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creator or owner display name"
          },
          "contacts": {
            "type": "string",
            "description": "Comma-joined contact names"
          },
          "form_results": {
            "type": [
              "string",
              "null"
            ]
          },
          "reported_duration_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "call_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 due datetime for tasks"
          },
          "is_complete": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 start for calendar events"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 end for calendar events"
          },
          "location_recorded": {
            "type": "boolean"
          },
          "deduplicated": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "interaction_type",
          "title",
          "notes",
          "created_at",
          "user",
          "contacts",
          "form_results",
          "reported_duration_seconds",
          "call_result",
          "due_at",
          "is_complete",
          "starts_at",
          "ends_at",
          "location_recorded",
          "deduplicated",
          "warnings"
        ]
      },
      "annotations": {
        "title": "Create Note",
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read",
            "ai:write"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read",
              "ai:write"
            ]
          }
        ]
      }
    },
    {
      "name": "create_task",
      "title": "Create Task",
      "description": "Create an incomplete task. due_at is the due date (ISO8601). Contacts are optional. Forms cannot be attached. Admins may pass assignee_user_id to create a task for another user in the organization. Optional reminders use notification_type email or push and seconds_before the due date. Optional idempotency_key prevents duplicate creates if the client retries.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Optional contact IDs from search_contacts"
          },
          "title": {
            "type": "string",
            "description": "Task title"
          },
          "notes": {
            "type": "string",
            "description": "Task notes"
          },
          "due_at": {
            "type": "string",
            "description": "Due date/time (ISO8601). Defaults to end of today in the user's time zone."
          },
          "assignee_user_id": {
            "type": "integer",
            "description": "Admin only: user ID to assign the task to. Defaults to the authenticated user."
          },
          "reminders": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "notification_type": {
                  "type": "string",
                  "minLength": 1
                },
                "seconds_before": {
                  "type": "integer"
                }
              },
              "required": [
                "notification_type",
                "seconds_before"
              ]
            }
          },
          "idempotency_key": {
            "type": "string",
            "description": "Client retry key; replays the original result for 24 hours"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "interaction_type": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO8601 timestamp"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creator or owner display name"
          },
          "contacts": {
            "type": "string",
            "description": "Comma-joined contact names"
          },
          "form_results": {
            "type": [
              "string",
              "null"
            ]
          },
          "reported_duration_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "call_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 due datetime for tasks"
          },
          "is_complete": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 start for calendar events"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 end for calendar events"
          },
          "location_recorded": {
            "type": "boolean"
          },
          "deduplicated": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "interaction_type",
          "title",
          "notes",
          "created_at",
          "user",
          "contacts",
          "form_results",
          "reported_duration_seconds",
          "call_result",
          "due_at",
          "is_complete",
          "starts_at",
          "ends_at",
          "location_recorded",
          "deduplicated",
          "warnings"
        ]
      },
      "annotations": {
        "title": "Create Task",
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read",
            "ai:write"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read",
              "ai:write"
            ]
          }
        ]
      }
    },
    {
      "name": "create_calendar_event",
      "title": "Create Calendar Event",
      "description": "Schedule a calendar event (planned check-in for a place, planned meeting for a person). Requires contact_ids, all of the same contact type, plus starts_at. Pass ends_at or duration_minutes for the event length. Recurring events are not supported. Optional form_ids attach forms to complete at the visit; do not send form_entries. Managers may pass assignee_user_id to schedule for a managed user. Optional idempotency_key prevents duplicate creates if the client retries.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contact_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Contact IDs from search_contacts; all places or all people"
          },
          "starts_at": {
            "type": "string",
            "description": "Event start (ISO8601)"
          },
          "ends_at": {
            "type": "string",
            "description": "Event end (ISO8601). Used instead of duration_minutes when present."
          },
          "duration_minutes": {
            "type": "integer",
            "description": "Reported duration in minutes when ends_at is omitted"
          },
          "title": {
            "type": "string",
            "description": "Optional title"
          },
          "notes": {
            "type": "string",
            "description": "Optional notes"
          },
          "form_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Optional form IDs from get_forms to complete at the visit"
          },
          "assignee_user_id": {
            "type": "integer",
            "description": "Admin or manager: user ID to schedule for. Defaults to the authenticated user."
          },
          "idempotency_key": {
            "type": "string",
            "description": "Client retry key; replays the original result for 24 hours"
          },
          "organization_id": {
            "type": "integer",
            "description": "Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id."
          }
        },
        "required": [
          "contact_ids",
          "starts_at"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "interaction_type": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO8601 timestamp"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Creator or owner display name"
          },
          "contacts": {
            "type": "string",
            "description": "Comma-joined contact names"
          },
          "form_results": {
            "type": [
              "string",
              "null"
            ]
          },
          "reported_duration_seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "call_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 due datetime for tasks"
          },
          "is_complete": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 start for calendar events"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO8601 end for calendar events"
          },
          "location_recorded": {
            "type": "boolean"
          },
          "deduplicated": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "interaction_type",
          "title",
          "notes",
          "created_at",
          "user",
          "contacts",
          "form_results",
          "reported_duration_seconds",
          "call_result",
          "due_at",
          "is_complete",
          "starts_at",
          "ends_at",
          "location_recorded",
          "deduplicated",
          "warnings"
        ]
      },
      "annotations": {
        "title": "Create Calendar Event",
        "readOnlyHint": false,
        "openWorldHint": false,
        "destructiveHint": false,
        "idempotentHint": false
      },
      "securitySchemes": [
        {
          "type": "oauth2",
          "scopes": [
            "ai:read",
            "ai:write"
          ]
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "oauth2",
            "scopes": [
              "ai:read",
              "ai:write"
            ]
          }
        ]
      }
    }
  ]
}