Grant machine pool to project
grant_pools_addCreates a grant letting a project use machines from a machine pool with its own defaults and usage caps within pool limits; returns the grant without creating machines.
Instructions
Lets a project create machines from a machine pool, optionally with its own defaults and usage caps within the pool's limits, and returns the grant. No machines are created by this call. Idempotency keys are retained only while the grant exists. Retrying creation after the grant is revoked or deleted can recreate it and restore access, including through automatic SDK retries. A replay compares the request with the current grant, so later edits can return 409 with code idempotency_key_conflict.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"machine_pool_id": "<machine_pool_id>",
"orgID": "<orgID>",
"projectID": "<projectID>"
},
"name": "grant_pools_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orgID | Yes | Organization ID (org_...). | |
| metadata | No | Arbitrary key-value labels stored with the resource. | |
| projectID | Yes | Project ID (proj_...). | |
| default_cwd | No | Default working directory for processes on this project's machines from the pool. | |
| description | No | Free-form note stored with the grant. | |
| max_total_cpu | No | Maximum total CPU across this project's live machines from the pool. | |
| machine_pool_id | Yes | Machine pool ID (mpo_...). | |
| max_machine_cpu | No | Largest CPU count one of this project's machines can request. | |
| min_machine_cpu | No | Smallest CPU count one of this project's machines can request. | |
| max_total_machines | No | Maximum number of live machines this project can have from the pool. | |
| default_machine_cpu | No | Default CPU count for machines this project creates from the pool, overriding the pool's default. | |
| max_total_memory_mb | No | Maximum total memory in MB across this project's live machines from the pool. | |
| max_machine_memory_mb | No | Largest memory in MB one of this project's machines can request. | |
| min_machine_memory_mb | No | Smallest memory in MB one of this project's machines can request. | |
| default_machine_memory_mb | No | Default memory in MB for machines this project creates from the pool, overriding the pool's default. | |
| delete_after_idle_minutes | No | Idle minutes before deleting a machine created through this grant. Use 0 to disable for this grant; omit to inherit the pool default. | |
| default_machine_env_overlay | No | Env overlay merged over the pool's default_machine_env for machines materialized through this grant; a null entry removes the key. | |
| default_machine_secret_env_overlay | No | Secret env overlay merged over the pool's default_machine_secret_env for machines materialized through this grant; a null entry removes the key. | |
| default_machine_provider_options_overlay | No | Provider-specific options layered over the pool's provider options for this project's machines. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Identifies the pool grant. | |
| org_id | Yes | Organization that owns the grant. | |
| metadata | Yes | Key-value metadata attached to the grant. | |
| created_at | Yes | When the grant was created. | |
| project_id | Yes | Project the grant lets create machines from the pool. | |
| updated_at | Yes | When the grant last changed. | |
| default_cwd | Yes | Working directory for this project's machines from the pool; empty uses the pool default. | |
| description | Yes | Free-form note about the grant; empty if none was set. | |
| max_total_cpu | Yes | Most vCPUs across this project's live pool machines; null means only the pool limit applies. | |
| machine_pool_id | Yes | Pool the project may create machines from. | |
| max_machine_cpu | Yes | Most vCPUs one of this project's machines can request; null uses the pool maximum. | |
| min_machine_cpu | Yes | Fewest vCPUs one of this project's machines can request; null uses the pool minimum. | |
| max_total_machines | Yes | Most live machines this project can have from the pool; null means only the pool limit applies. | |
| default_machine_cpu | Yes | Default vCPUs for this project's machines from the pool; null uses the pool default. | |
| max_total_memory_mb | Yes | Most memory in MB across this project's live pool machines; null means only the pool limit applies. | |
| max_machine_memory_mb | Yes | Most memory in MB one of this project's machines can request; null uses the pool maximum. | |
| min_machine_memory_mb | Yes | Least memory in MB one of this project's machines can request; null uses the pool minimum. | |
| default_machine_memory_mb | Yes | Default memory in MB for this project's machines from the pool; null uses the pool default. | |
| delete_after_idle_minutes | Yes | Idle minutes before deleting a machine created through this grant. Zero disables deletion for this grant; null inherits the pool default. | |
| default_machine_env_overlay | Yes | Env overlay merged over the pool's default_machine_env for machines materialized through this grant; a null entry removes the key. | |
| default_machine_secret_env_overlay | Yes | Secret env overlay merged over the pool's default_machine_secret_env for machines materialized through this grant; a null entry removes the key. | |
| default_machine_provider_options_overlay | Yes | Provider options layered over the pool's for this project's machines. |