{
  "service": "metronome",
  "displayName": "Metronome",
  "categories": [
    "Finance",
    "Developer Tools"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Token",
      "placeholder": "METRONOME_BEARER_TOKEN",
      "description": "Metronome API token sent with the Authorization: Bearer header. Create one in Metronome under Connections > API tokens & webhooks: https://docs.metronome.com/api-reference/authentication."
    }
  ],
  "homepageUrl": "https://metronome.com",
  "actions": [
    {
      "id": "metronome.get_customer",
      "service": "metronome",
      "name": "get_customer",
      "description": "Get detailed information for a specific Metronome customer.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "minLength": 1,
            "description": "The Metronome customer ID."
          }
        },
        "additionalProperties": false,
        "description": "Input identifying one Metronome customer."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Metronome customer ID."
              },
              "externalId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The deprecated external ID value returned by Metronome when available."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "type": "string",
                "description": "The customer display name."
              },
              "ingestAliases": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A customer ingest alias."
                },
                "description": "The ingest aliases that can identify this customer in usage events."
              },
              "createdAt": {
                "type": "string",
                "description": "The RFC 3339 timestamp when the customer was created."
              },
              "updatedAt": {
                "type": "string",
                "description": "The RFC 3339 timestamp when the customer was last updated."
              },
              "archivedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The RFC 3339 timestamp when the customer was archived."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "customerConfig": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The customer_config object returned by Metronome."
              },
              "customFields": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The custom fields returned for this customer."
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw Metronome object returned by the API."
              }
            },
            "additionalProperties": false,
            "description": "A normalized Metronome customer."
          }
        },
        "additionalProperties": false,
        "description": "The Metronome customer lookup result."
      }
    },
    {
      "id": "metronome.get_invoice",
      "service": "metronome",
      "name": "get_invoice",
      "description": "Get a specific Metronome invoice by customer ID and invoice ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "minLength": 1,
            "description": "The Metronome customer ID."
          },
          "invoiceId": {
            "type": "string",
            "minLength": 1,
            "description": "The Metronome invoice ID."
          },
          "skipZeroQtyLineItems": {
            "type": "boolean",
            "description": "If true, Metronome omits zero-quantity line items."
          }
        },
        "additionalProperties": false,
        "required": [
          "customerId",
          "invoiceId"
        ],
        "description": "Input parameters for reading one Metronome invoice."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "invoice": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Metronome invoice ID."
              },
              "customerId": {
                "type": "string",
                "description": "The Metronome customer ID associated with this invoice."
              },
              "status": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The invoice status returned by Metronome."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The invoice type returned by Metronome."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "contractId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The contract ID associated with this invoice when available."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "startTimestamp": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The RFC 3339 billing period start timestamp."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "endTimestamp": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The RFC 3339 billing period end timestamp."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "issuedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The RFC 3339 timestamp when the invoice was issued."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "total": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "The invoice total amount in the credit type unit."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subtotal": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "The invoice subtotal amount in the credit type unit."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "amountDue": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "The invoice amount due in the credit type unit."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lineItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Metronome object returned by the API."
                },
                "description": "The invoice line items returned by Metronome."
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw Metronome object returned by the API."
              }
            },
            "additionalProperties": false,
            "description": "A normalized Metronome invoice."
          }
        },
        "additionalProperties": false,
        "description": "The Metronome invoice lookup result."
      }
    },
    {
      "id": "metronome.list_billable_metrics",
      "service": "metronome",
      "name": "list_billable_metrics",
      "description": "List Metronome billable metrics with optional archived metrics and pagination.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "The maximum number of results to return. Metronome allows 1 to 100."
          },
          "nextPage": {
            "type": "string",
            "minLength": 1,
            "description": "The pagination cursor returned by a previous list call."
          },
          "includeArchived": {
            "type": "boolean",
            "description": "If true, archived billable metrics are included."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Metronome billable metrics."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "billableMetrics": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Metronome billable metric ID."
                },
                "name": {
                  "type": "string",
                  "description": "The billable metric display name."
                },
                "aggregationType": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The billable metric aggregation type."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "aggregationKey": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The property key used for aggregation."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "archivedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The RFC 3339 timestamp when the billable metric was archived."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "customFields": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The custom fields returned for this billable metric."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Metronome object returned by the API."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Metronome billable metric."
            },
            "description": "The billable metrics returned by Metronome."
          },
          "nextPage": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor to pass as nextPage when more results are available."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The Metronome billable metric list result."
      }
    },
    {
      "id": "metronome.list_customers",
      "service": "metronome",
      "name": "list_customers",
      "description": "List Metronome customers with optional filters and cursor pagination.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "The maximum number of results to return. Metronome allows 1 to 100."
          },
          "nextPage": {
            "type": "string",
            "minLength": 1,
            "description": "The pagination cursor returned by a previous list call."
          },
          "ingestAlias": {
            "type": "string",
            "minLength": 1,
            "description": "Filter customers by a Metronome ingest alias."
          },
          "customerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A Metronome customer ID."
            },
            "description": "Filter customers by Metronome customer IDs. Metronome allows up to 100 IDs.",
            "maxItems": 100
          },
          "onlyArchived": {
            "type": "boolean",
            "description": "If true, only archived customers are returned."
          },
          "salesforceAccountIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A Salesforce account ID."
            },
            "description": "Filter customers by Salesforce account IDs. Metronome allows up to 100 IDs.",
            "maxItems": 100
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for listing Metronome customers."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "customers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Metronome customer ID."
                },
                "externalId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The deprecated external ID value returned by Metronome when available."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "type": "string",
                  "description": "The customer display name."
                },
                "ingestAliases": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "A customer ingest alias."
                  },
                  "description": "The ingest aliases that can identify this customer in usage events."
                },
                "createdAt": {
                  "type": "string",
                  "description": "The RFC 3339 timestamp when the customer was created."
                },
                "updatedAt": {
                  "type": "string",
                  "description": "The RFC 3339 timestamp when the customer was last updated."
                },
                "archivedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The RFC 3339 timestamp when the customer was archived."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "customerConfig": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The customer_config object returned by Metronome."
                },
                "customFields": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The custom fields returned for this customer."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Metronome object returned by the API."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Metronome customer."
            },
            "description": "The customers returned by Metronome."
          },
          "nextPage": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor to pass as nextPage when more results are available."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The Metronome customer list result."
      }
    },
    {
      "id": "metronome.list_invoices",
      "service": "metronome",
      "name": "list_invoices",
      "description": "List invoices for a Metronome customer with stable filters and pagination.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "minLength": 1,
            "description": "The Metronome customer ID."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "The maximum number of results to return. Metronome allows 1 to 100."
          },
          "nextPage": {
            "type": "string",
            "minLength": 1,
            "description": "The pagination cursor returned by a previous list call."
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "FINALIZED",
              "VOID"
            ],
            "description": "Filter invoices by status."
          },
          "type": {
            "type": "string",
            "enum": [
              "USAGE",
              "USAGE_CONSOLIDATED",
              "SCHEDULED"
            ],
            "description": "Filter invoices by type."
          },
          "sort": {
            "type": "string",
            "enum": [
              "date_asc",
              "date_desc"
            ],
            "description": "Sort invoices by issue date."
          },
          "skipZeroQtyLineItems": {
            "type": "boolean",
            "description": "If true, Metronome omits zero-quantity line items."
          },
          "creditTypeId": {
            "type": "string",
            "minLength": 1,
            "description": "Only return invoices for the specified credit type."
          },
          "contractId": {
            "type": "string",
            "minLength": 1,
            "description": "Only return invoices for the specified contract ID."
          },
          "startingOn": {
            "type": "string",
            "minLength": 1,
            "description": "Only return billing periods starting at or after this RFC 3339 timestamp."
          },
          "endingBefore": {
            "type": "string",
            "minLength": 1,
            "description": "Only return billing periods ending before this RFC 3339 timestamp."
          }
        },
        "additionalProperties": false,
        "required": [
          "customerId"
        ],
        "description": "Input parameters for listing Metronome invoices."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "invoices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Metronome invoice ID."
                },
                "customerId": {
                  "type": "string",
                  "description": "The Metronome customer ID associated with this invoice."
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The invoice status returned by Metronome."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The invoice type returned by Metronome."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "contractId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The contract ID associated with this invoice when available."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "startTimestamp": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The RFC 3339 billing period start timestamp."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "endTimestamp": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The RFC 3339 billing period end timestamp."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "issuedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The RFC 3339 timestamp when the invoice was issued."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "total": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "The invoice total amount in the credit type unit."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subtotal": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "The invoice subtotal amount in the credit type unit."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "amountDue": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "The invoice amount due in the credit type unit."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lineItems": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true,
                    "description": "The raw Metronome object returned by the API."
                  },
                  "description": "The invoice line items returned by Metronome."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Metronome object returned by the API."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Metronome invoice."
            },
            "description": "The invoices returned by Metronome."
          },
          "nextPage": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor to pass as nextPage when more results are available."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The Metronome invoice list result."
      }
    }
  ]
}
