Open Context Protocol is live! 🚀 Read the launch post
getProductsProductFeatures

getProductsProductFeatures

List all features attached to a product

Details

  • Method: GET
  • Path: /v1/products/{product}/features
  • Operation ID: GetProductsProductFeatures

Parameters

{
  "ending_before": {
    "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "expand": {
    "description": "Specifies which fields in the response should be expanded.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "limit": {
    "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "product": {
    "description": "",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "starting_after": {
    "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "description": "",
  "properties": {
    "data": {
      "items": {
        "description": "A product_feature represents an attachment between a feature and a product.\nWhen a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer.",
        "properties": {
          "entitlement_feature": {
            "description": "A feature represents a monetizable ability or functionality in your system.\nFeatures can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.",
            "properties": {
              "active": {
                "description": "Inactive features cannot be attached to new products and will not be returned from the features list endpoint.",
                "type": "boolean"
              },
              "id": {
                "description": "Unique identifier for the object.",
                "maxLength": 5000,
                "type": "string"
              },
              "livemode": {
                "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
                "type": "boolean"
              },
              "lookup_key": {
                "description": "A unique key you provide as your own system identifier. This may be up to 80 characters.",
                "maxLength": 5000,
                "type": "string"
              },
              "metadata": {
                "additionalProperties": {
                  "maxLength": 500,
                  "type": "string"
                },
                "description": "Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
                "type": "object"
              },
              "name": {
                "description": "The feature's name, for your own purpose, not meant to be displayable to the customer.",
                "maxLength": 80,
                "type": "string"
              },
              "object": {
                "description": "String representing the object's type. Objects of the same type share the same value.",
                "enum": [
                  "entitlements.feature"
                ],
                "type": "string"
              }
            },
            "required": [
              "active",
              "id",
              "livemode",
              "lookup_key",
              "metadata",
              "name",
              "object"
            ],
            "title": "Feature",
            "type": "object",
            "x-expandableFields": [],
            "x-resourceId": "entitlements.feature"
          },
          "id": {
            "description": "Unique identifier for the object.",
            "maxLength": 5000,
            "type": "string"
          },
          "livemode": {
            "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
            "type": "boolean"
          },
          "object": {
            "description": "String representing the object's type. Objects of the same type share the same value.",
            "enum": [
              "product_feature"
            ],
            "type": "string"
          }
        },
        "required": [
          "entitlement_feature",
          "id",
          "livemode",
          "object"
        ],
        "title": "ProductFeature",
        "type": "object",
        "x-expandableFields": [
          "entitlement_feature"
        ],
        "x-resourceId": "product_feature"
      },
      "type": "array"
    },
    "has_more": {
      "description": "True if this list has another page of items after this one that can be fetched.",
      "type": "boolean"
    },
    "object": {
      "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
      "enum": [
        "list"
      ],
      "type": "string"
    },
    "url": {
      "description": "The URL where this list can be accessed.",
      "maxLength": 5000,
      "type": "string"
    }
  },
  "required": [
    "data",
    "has_more",
    "object",
    "url"
  ],
  "title": "EntitlementsResourceProductFeatureList",
  "type": "object",
  "x-expandableFields": [
    "data"
  ]
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('stripe')

# Call this tool
result = await agent.call_tool('getProductsProductFeatures', {
    # Add required parameters here
})