Open Context Protocol is live! 🚀 Read the launch post

getBlock

Get Block Storage

Details

  • Method: GET
  • Path: /blocks/{block-id}
  • Operation ID: get-block

Parameters

{}

Response Schema

{
  "type": "object",
  "properties": {
    "block": {
      "title": "blockstorage",
      "type": "object",
      "x-tags": [
        "block"
      ],
      "description": "Block Storage information.",
      "x-examples": {
        "block structure": {
          "id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60",
          "cost": 10,
          "status": "active",
          "size_gb": 100,
          "region": "ewr",
          "attached_to_instance": "b92f4771-d8cd-480a-b6e6-a14ca31ea2ca",
          "date_created": "2020-10-10T01:56:20+00:00",
          "label": "Example Block Storage"
        }
      },
      "properties": {
        "id": {
          "type": "string",
          "description": "A unique ID for the Block Storage."
        },
        "cost": {
          "type": "integer",
          "description": "The monthly cost of this Block Storage."
        },
        "status": {
          "type": "string",
          "description": "The current status of this Block Storage.\n\n* active"
        },
        "size_gb": {
          "type": "integer",
          "description": "Size of the Block Storage in GB."
        },
        "region": {
          "type": "string",
          "description": "The [Region id](#operation/list-regions) where the Block Storage is located."
        },
        "attached_to_instance": {
          "type": "string",
          "description": "The [Instance id](#operation/list-instances) with this Block Storage attached."
        },
        "date_created": {
          "type": "string",
          "description": "The date this Block Storage was created."
        },
        "label": {
          "type": "string",
          "description": "The user-supplied label."
        },
        "mount_id": {
          "type": "string",
          "description": "An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio."
        }
      }
    }
  }
}

Usage

from ocp_agent import OCPAgent

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

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