veryfront__get_credit_usage
Requires account.billing.read.
Access
No external-service connection is required. Use a Veryfront credential with access to the requested resources.
Call type: Read-only.
Arguments
| Field | Type | Required | Description and constraints |
|---|---|---|---|
preset | string | No | Whole local days, defaulting to 30d. Explicit from/to bounds take precedence over preset, including SDK-supplied defaults. Default: "30d". Values: "7d", "30d", "90d". |
from | string | No | Inclusive start. Supply both from and to; these bounds take precedence over preset. Format: date-time. |
to | string | No | Exclusive end, no later than the end of today in timezone. |
timezone | string | No | Provide the timezone. Default: "UTC". |
granularity | string | No | UTC hours, or local calendar days, Monday-based weeks and months. Default: "day". Values: "hour", "day", "week", "month". |
group_by | string[] | No | Grouping dimensions supported by this operation. Repeat the parameter or use a comma-separated list. |
compare | string | No | Compare preceding calendar months for whole-month custom ranges, local days for whole-day ranges and presets, or equal elapsed duration otherwise. Value: "previous_period". |
project_reference | string | No | Project ID or slug that narrows the read to one project of the account. A project of another account is not found. Minimum length: 1. |
Example request
Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See MCP client setup.
request.json
1{2 "jsonrpc": "2.0",3 "id": 1,4 "method": "tools/call",5 "params": {6 "name": "veryfront__get_credit_usage",7 "arguments": {}8 }9}Result
The published output shape is summarized below. Inspect both the MCP response content and isError when handling a call.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
summary | object | Yes | Structured summary details associated with this tool result. |
timeframe | object | Yes | Structured timeframe details associated with this tool result. |
series | object[] | Yes | List of series associated with this tool result. |
projects | object[] | Yes | List of projects associated with this tool result. |
models | object[] | Yes | List of models associated with this tool result. |
serving | object[] | No | |
scope | object | No | |
group_by | string[] | No |
Full schemas
input-schema.json
1{2 "type": "object",3 "properties": {4 "preset": {5 "type": "string",6 "enum": [7 "7d",8 "30d",9 "90d"10 ],11 "description": "Whole local days, defaulting to 30d. Explicit from/to bounds take precedence over preset, including SDK-supplied defaults.",12 "default": "30d"13 },14 "from": {15 "type": "string",16 "format": "date-time",17 "description": "Inclusive start. Supply both from and to; these bounds take precedence over preset."18 },19 "to": {20 "$ref": "#/properties/from",21 "description": "Exclusive end, no later than the end of today in timezone."22 },23 "timezone": {24 "type": "string",25 "description": "Provide the timezone.",26 "default": "UTC"27 },28 "granularity": {29 "type": "string",30 "enum": [31 "hour",32 "day",33 "week",34 "month"35 ],36 "description": "UTC hours, or local calendar days, Monday-based weeks and months.",37 "default": "day"38 },39 "group_by": {40 "type": "array",41 "items": {42 "type": "string",43 "enum": [44 "project",45 "model",46 "api_key",47 "member"48 ],49 "description": "One group by item supplied to the tool."50 },51 "maxItems": 4,52 "description": "Grouping dimensions supported by this operation. Repeat the parameter or use a comma-separated list."53 },54 "compare": {55 "type": "string",56 "const": "previous_period",57 "description": "Compare preceding calendar months for whole-month custom ranges, local days for whole-day ranges and presets, or equal elapsed duration otherwise."58 },59 "project_reference": {60 "type": "string",61 "minLength": 1,62 "description": "Project ID or slug that narrows the read to one project of the account. A project of another account is not found."63 }64 },65 "additionalProperties": false,66 "description": "Arguments for the get_credit_usage tool.",67 "$schema": "http://json-schema.org/draft-07/schema#"68}output-schema.json
1{2 "type": "object",3 "properties": {4 "summary": {5 "type": "object",6 "properties": {7 "credits_used": {8 "type": "number"9 },10 "requests": {11 "type": "number"12 },13 "input_tokens": {14 "type": "number"15 },16 "output_tokens": {17 "type": "number"18 },19 "cache_creation_input_tokens": {20 "type": "number"21 },22 "cache_read_input_tokens": {23 "type": "number"24 },25 "previous": {26 "type": "object",27 "properties": {28 "credits_used": {29 "$ref": "#/properties/summary/properties/credits_used",30 "description": "The credits used returned by the tool."31 },32 "requests": {33 "$ref": "#/properties/summary/properties/requests",34 "description": "The requests returned by the tool."35 },36 "input_tokens": {37 "$ref": "#/properties/summary/properties/input_tokens",38 "description": "The input tokens returned by the tool."39 },40 "output_tokens": {41 "$ref": "#/properties/summary/properties/output_tokens",42 "description": "The output tokens returned by the tool."43 },44 "cache_creation_input_tokens": {45 "$ref": "#/properties/summary/properties/cache_creation_input_tokens",46 "description": "The cache creation input tokens returned by the tool."47 },48 "cache_read_input_tokens": {49 "$ref": "#/properties/summary/properties/cache_read_input_tokens",50 "description": "The cache read input tokens returned by the tool."51 }52 },53 "required": [54 "credits_used",55 "requests",56 "input_tokens",57 "output_tokens",58 "cache_creation_input_tokens",59 "cache_read_input_tokens"60 ],61 "additionalProperties": false62 }63 },64 "required": [65 "credits_used",66 "requests",67 "input_tokens",68 "output_tokens",69 "cache_creation_input_tokens",70 "cache_read_input_tokens"71 ],72 "additionalProperties": false,73 "description": "Structured summary details associated with this tool result."74 },75 "timeframe": {76 "type": "object",77 "properties": {78 "from": {79 "type": "string",80 "format": "date-time",81 "description": "Inclusive start."82 },83 "to": {84 "type": "string",85 "format": "date-time",86 "description": "Exclusive end."87 },88 "timezone": {89 "type": "string"90 },91 "granularity": {92 "type": "string",93 "enum": [94 "hour",95 "day",96 "week",97 "month"98 ]99 },100 "bucket_count": {101 "type": "integer",102 "minimum": 0103 },104 "previous": {105 "type": "object",106 "properties": {107 "from": {108 "$ref": "#/properties/timeframe/properties/from",109 "description": "The from returned by the tool."110 },111 "to": {112 "$ref": "#/properties/timeframe/properties/to",113 "description": "The to returned by the tool."114 },115 "timezone": {116 "$ref": "#/properties/timeframe/properties/timezone",117 "description": "The timezone returned by the tool."118 },119 "granularity": {120 "$ref": "#/properties/timeframe/properties/granularity",121 "description": "The granularity returned by the tool."122 },123 "bucket_count": {124 "$ref": "#/properties/timeframe/properties/bucket_count",125 "description": "The bucket count returned by the tool."126 }127 },128 "required": [129 "from",130 "to",131 "timezone",132 "granularity",133 "bucket_count"134 ],135 "additionalProperties": false136 }137 },138 "required": [139 "from",140 "to",141 "timezone",142 "granularity",143 "bucket_count"144 ],145 "additionalProperties": false,146 "description": "Structured timeframe details associated with this tool result."147 },148 "series": {149 "type": "array",150 "items": {151 "type": "object",152 "properties": {153 "bucket_start": {154 "type": "string"155 },156 "credits_used": {157 "type": "number"158 },159 "requests": {160 "type": "number"161 },162 "input_tokens": {163 "type": "number"164 },165 "output_tokens": {166 "type": "number"167 },168 "cache_creation_input_tokens": {169 "type": "number"170 },171 "cache_read_input_tokens": {172 "type": "number"173 },174 "projects": {175 "type": "array",176 "items": {177 "type": "object",178 "properties": {179 "project_id": {180 "anyOf": [181 {182 "type": "string",183 "format": "uuid",184 "description": "Project identifier associated with this result."185 },186 {187 "type": "null",188 "description": "Project identifier associated with this result."189 }190 ],191 "description": "Project identifier associated with this result."192 },193 "project_name": {194 "type": "string"195 },196 "project_slug": {197 "type": [198 "string",199 "null"200 ]201 },202 "credits_used": {203 "type": "number"204 },205 "requests": {206 "type": "number"207 },208 "input_tokens": {209 "type": "number"210 },211 "output_tokens": {212 "type": "number"213 },214 "cache_creation_input_tokens": {215 "type": "number"216 },217 "cache_read_input_tokens": {218 "type": "number"219 }220 },221 "required": [222 "project_id",223 "project_name",224 "project_slug",225 "credits_used",226 "requests",227 "input_tokens",228 "output_tokens",229 "cache_creation_input_tokens",230 "cache_read_input_tokens"231 ],232 "additionalProperties": false233 },234 "description": "List of projects associated with this tool result."235 },236 "groups": {237 "type": "array",238 "items": {239 "type": "object",240 "properties": {241 "credits_used": {242 "$ref": "#/properties/summary/properties/credits_used",243 "description": "The credits used returned by the tool."244 },245 "requests": {246 "$ref": "#/properties/summary/properties/requests",247 "description": "The requests returned by the tool."248 },249 "input_tokens": {250 "$ref": "#/properties/summary/properties/input_tokens",251 "description": "The input tokens returned by the tool."252 },253 "output_tokens": {254 "$ref": "#/properties/summary/properties/output_tokens",255 "description": "The output tokens returned by the tool."256 },257 "cache_creation_input_tokens": {258 "$ref": "#/properties/summary/properties/cache_creation_input_tokens",259 "description": "The cache creation input tokens returned by the tool."260 },261 "cache_read_input_tokens": {262 "$ref": "#/properties/summary/properties/cache_read_input_tokens",263 "description": "The cache read input tokens returned by the tool."264 },265 "dimensions": {266 "type": "object",267 "properties": {268 "project_id": {269 "anyOf": [270 {271 "type": "string",272 "format": "uuid",273 "description": "Project identifier associated with this result."274 },275 {276 "type": "null",277 "description": "Project identifier associated with this result."278 }279 ],280 "description": "Project identifier associated with this result."281 },282 "model": {283 "type": [284 "string",285 "null"286 ],287 "description": "AI model id associated with this tool result."288 },289 "model_provider": {290 "type": [291 "string",292 "null"293 ]294 },295 "api_key_id": {296 "anyOf": [297 {298 "type": "string",299 "format": "uuid"300 },301 {302 "type": "null",303 "description": "The api key id returned by the tool."304 }305 ]306 },307 "api_key_kind": {308 "type": "string",309 "enum": [310 "api_key",311 "no_api_key",312 "other_keys",313 "deleted_keys",314 "unattributed"315 ],316 "description": "Key-listing reports distinguish named keys, other/deleted keys, keyless and unattributed usage."317 },318 "member_id": {319 "anyOf": [320 {321 "type": "string",322 "format": "uuid"323 },324 {325 "type": "null",326 "description": "The member id returned by the tool."327 }328 ]329 },330 "member_kind": {331 "type": "string",332 "enum": [333 "member",334 "former_member",335 "deleted_users",336 "automations",337 "unattributed"338 ],339 "description": "Project-member reports distinguish named people, deleted users, automations and unattributed usage."340 }341 },342 "additionalProperties": false,343 "description": "Structured dimensions details associated with this tool result."344 }345 },346 "required": [347 "credits_used",348 "requests",349 "input_tokens",350 "output_tokens",351 "cache_creation_input_tokens",352 "cache_read_input_tokens",353 "dimensions"354 ],355 "additionalProperties": false356 }357 }358 },359 "required": [360 "bucket_start",361 "credits_used",362 "requests",363 "input_tokens",364 "output_tokens",365 "cache_creation_input_tokens",366 "cache_read_input_tokens",367 "projects"368 ],369 "additionalProperties": false370 },371 "description": "List of series associated with this tool result."372 },373 "projects": {374 "type": "array",375 "items": {376 "$ref": "#/properties/series/items/properties/projects/items",377 "description": "One project item returned by the tool."378 },379 "description": "List of projects associated with this tool result."380 },381 "models": {382 "type": "array",383 "items": {384 "type": "object",385 "properties": {386 "funding": {387 "type": "string",388 "enum": [389 "managed",390 "customer",391 "mixed"392 ],393 "description": "Recorded credential funding; omitted when unknown. Credits always reflect the historical ledger."394 },395 "model": {396 "type": "string",397 "description": "AI model id associated with this tool result."398 },399 "canonical_model_id": {400 "type": "string"401 },402 "model_provider": {403 "type": "string"404 },405 "inference_provider": {406 "type": "string"407 },408 "credits_used": {409 "type": "number"410 },411 "requests": {412 "type": "number"413 },414 "input_tokens": {415 "type": "number"416 },417 "output_tokens": {418 "type": "number"419 },420 "cache_creation_input_tokens": {421 "type": "number"422 },423 "cache_read_input_tokens": {424 "type": "number"425 },426 "provider_cost_usd": {427 "type": "number"428 },429 "veryfront_charge_usd": {430 "type": "number"431 },432 "cost_attribution": {433 "type": "string",434 "enum": [435 "estimated"436 ]437 }438 },439 "required": [440 "model",441 "model_provider",442 "inference_provider",443 "credits_used",444 "requests",445 "input_tokens",446 "output_tokens",447 "cache_creation_input_tokens",448 "cache_read_input_tokens"449 ],450 "additionalProperties": false451 },452 "description": "List of models associated with this tool result."453 },454 "serving": {455 "type": "array",456 "items": {457 "type": "object",458 "properties": {459 "host": {460 "type": [461 "string",462 "null"463 ]464 },465 "tier": {466 "type": [467 "string",468 "null"469 ]470 },471 "funding": {472 "type": "string",473 "enum": [474 "managed",475 "customer",476 "mixed"477 ],478 "description": "Recorded funding for this spend group; omitted when provenance is unknown."479 },480 "credits": {481 "type": "number"482 },483 "usd": {484 "type": "number"485 },486 "requests": {487 "type": "number"488 },489 "input_tokens": {490 "type": "number"491 },492 "output_tokens": {493 "type": "number"494 },495 "cache_read_tokens": {496 "type": "number"497 },498 "cache_creation_tokens": {499 "type": "number"500 }501 },502 "required": [503 "host",504 "tier",505 "credits",506 "usd",507 "requests",508 "input_tokens",509 "output_tokens",510 "cache_read_tokens",511 "cache_creation_tokens"512 ],513 "additionalProperties": false514 }515 },516 "scope": {517 "type": "object",518 "properties": {519 "kind": {520 "type": "string",521 "const": "account"522 },523 "account_id": {524 "type": "string",525 "format": "uuid"526 },527 "project_id": {528 "anyOf": [529 {530 "type": "string",531 "format": "uuid",532 "description": "Project identifier associated with this result."533 },534 {535 "type": "null",536 "description": "Project identifier associated with this result."537 }538 ],539 "description": "Project identifier associated with this result."540 }541 },542 "required": [543 "kind",544 "account_id",545 "project_id"546 ],547 "additionalProperties": false548 },549 "group_by": {550 "type": "array",551 "items": {552 "type": "string",553 "enum": [554 "project",555 "model",556 "api_key",557 "member"558 ]559 }560 }561 },562 "required": [563 "summary",564 "timeframe",565 "series",566 "projects",567 "models"568 ],569 "additionalProperties": false,570 "description": "Structured result returned by the get_credit_usage tool.",571 "$schema": "http://json-schema.org/draft-07/schema#"572}