## Tool: `get_price`

Gets the latest consumption model price for a given SKU.

The following code sample shows how to use `curl` to call the `get_price` MCP tool.

| Curl Request |
|---|
| ```bash curl --location 'https://cloudbilling.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "get_price", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' ``` |

## Input Schema

Request message for \[GetPrice\]\[google.cloud.billing.price.v2main.Prices.GetPrice\].

### GetPriceRequest

| JSON representation |
|---|
| ``` { "name": string, "currencyCode": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. Name of the latest price to retrieve. Format: skus/{sku}/price |
| `currencyCode` | `string` Optional. ISO-4217 currency code for the price. If not specified, USD will be used. |

## Output Schema

Encapsulates the latest price for a `SKU`.

### Price

| JSON representation |
|---|
| ``` { "name": string, "currencyCode": string, "skuPrices": [ { object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.SkuPrice`) } ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name for the latest price. |
| `currencyCode` | `string` ISO-4217 currency code for the price. |
| `skuPrices[]` | ``object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.SkuPrice`)`` consumption model price for the `SKU`. |

### SkuPrice

| JSON representation |
|---|
| ``` { "consumptionModel": string, "consumptionModelDescription": string, "valueType": string, // Union field `value` can be only one of the following: "rate": { object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.Rate`) } // End of list of possible types for union field `value`. } ``` |

| Fields ||
|---|---|
| `consumptionModel` | `string` Resource name of the consumption model. |
| `consumptionModelDescription` | `string` Description of the consumption model. Example: "Default", "BigQuery CUD - 1 Year". |
| `valueType` | `string` Type of the price. It can have values: \["unspecified", "rate"\]. |
| Union field `value`. Value of the price. `value` can be only one of the following: ||
| `rate` | ``object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.Rate`)`` Rate price metadata. `SKUs` with `Rate` price are offered by pricing tiers. The price can have 1 or more rate pricing tiers. |

### Rate

| JSON representation |
|---|
| ``` { "tiers": [ { object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.RateTier`) } ], "unitInfo": { object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.UnitInfo`) }, "aggregationInfo": { object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.AggregationInfo`) } } ``` |

| Fields ||
|---|---|
| `tiers[]` | ``object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.RateTier`)`` All tiers associated with the `Rate` price. |
| `unitInfo` | ``object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.UnitInfo`)`` Unit info such as name and quantity. |
| `aggregationInfo` | ``object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.AggregationInfo`)`` Aggregation info for tiers such as aggregation level and interval. |

### RateTier

| JSON representation |
|---|
| ``` { "startAmount": { object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_billing_account_prices#Output.Schema.Decimal`) }, "listPrice": { object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_billing_account_prices#Output.Schema.Money`) } } ``` |

| Fields ||
|---|---|
| `startAmount` | ``object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_billing_account_prices#Output.Schema.Decimal`)`` Lower bound amount for a tier. Tiers 0-100, 100-200 will be represented with two tiers with `start_amount` 0 and 100. |
| `listPrice` | ``object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_billing_account_prices#Output.Schema.Money`)`` List price of one tier. |

### Decimal

| JSON representation |
|---|
| ``` { "value": string } ``` |

| Fields ||
|---|---|
| `value` | `string` The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\> `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -\> `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -\> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` \<-\> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. |

### Money

| JSON representation |
|---|
| ``` { "currencyCode": string, "units": string, "nanos": integer } ``` |

| Fields ||
|---|---|
| `currencyCode` | `string` The three-letter currency code defined in ISO 4217. |
| `units` | `string (https://developers.google.com/discovery/v1/type-format format)` The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| `nanos` | `integer` Number of nano (10\^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |

### UnitInfo

| JSON representation |
|---|
| ``` { "unit": string, "unitDescription": string, "unitQuantity": { object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_billing_account_prices#Output.Schema.Decimal`) } } ``` |

| Fields ||
|---|---|
| `unit` | `string` Shorthand for the unit. Example: GiBy.mo. |
| `unitDescription` | `string` Human-readable description of the unit. Example: gibibyte month. |
| `unitQuantity` | ``object (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_billing_account_prices#Output.Schema.Decimal`)`` Unit quantity for the tier. Example: if the RateTier price is $1 per 1000000 Bytes, then `unit_quantity` is set to 1000000. |

### AggregationInfo

| JSON representation |
|---|
| ``` { "level": enum (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.Level`), "interval": enum (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.Interval`) } ``` |

| Fields ||
|---|---|
| `level` | ``enum (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.Level`)`` Level at which usage is aggregated to compute cost. Example: "ACCOUNT" level indicates that usage is aggregated across all projects in a single account. |
| `interval` | ``enum (`https://docs.cloud.google.com/billing/docs/reference/pricing-api/mcp/tools_list/list_prices#Output.Schema.Interval`)`` Interval at which usage is aggregated to compute cost. Example: "MONTHLY" interval indicates that usage is aggregated every month. |

### Level

Different aggregation levels.

| Enums ||
|---|---|
| `LEVEL_UNSPECIFIED` | Default unspecified value. |
| `LEVEL_ACCOUNT` | Usage is aggregated at an account level. |
| `LEVEL_PROJECT` | Usage is aggregated at a project level. |

### Interval

Different aggregation intervals.

| Enums ||
|---|---|
| `INTERVAL_UNSPECIFIED` | Default unspecified value. |
| `INTERVAL_MONTHLY` | Usage is aggregated every month. |
| `INTERVAL_DAILY` | Usage is aggregated every day. |

### Tool Annotations

Destructive Hint: ❌ \| Idempotent Hint: ✅ \| Read Only Hint: ✅ \| Open World Hint: ❌