Skip to main content
Glama

Grant machine pool to project

grant_pools_add

Creates 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

NameRequiredDescriptionDefault
orgIDYesOrganization ID (org_...).
metadataNoArbitrary key-value labels stored with the resource.
projectIDYesProject ID (proj_...).
default_cwdNoDefault working directory for processes on this project's machines from the pool.
descriptionNoFree-form note stored with the grant.
max_total_cpuNoMaximum total CPU across this project's live machines from the pool.
machine_pool_idYesMachine pool ID (mpo_...).
max_machine_cpuNoLargest CPU count one of this project's machines can request.
min_machine_cpuNoSmallest CPU count one of this project's machines can request.
max_total_machinesNoMaximum number of live machines this project can have from the pool.
default_machine_cpuNoDefault CPU count for machines this project creates from the pool, overriding the pool's default.
max_total_memory_mbNoMaximum total memory in MB across this project's live machines from the pool.
max_machine_memory_mbNoLargest memory in MB one of this project's machines can request.
min_machine_memory_mbNoSmallest memory in MB one of this project's machines can request.
default_machine_memory_mbNoDefault memory in MB for machines this project creates from the pool, overriding the pool's default.
delete_after_idle_minutesNoIdle 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_overlayNoEnv 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_overlayNoSecret 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_overlayNoProvider-specific options layered over the pool's provider options for this project's machines.

Output Schema

NameRequiredDescriptionDefault
idYesIdentifies the pool grant.
org_idYesOrganization that owns the grant.
metadataYesKey-value metadata attached to the grant.
created_atYesWhen the grant was created.
project_idYesProject the grant lets create machines from the pool.
updated_atYesWhen the grant last changed.
default_cwdYesWorking directory for this project's machines from the pool; empty uses the pool default.
descriptionYesFree-form note about the grant; empty if none was set.
max_total_cpuYesMost vCPUs across this project's live pool machines; null means only the pool limit applies.
machine_pool_idYesPool the project may create machines from.
max_machine_cpuYesMost vCPUs one of this project's machines can request; null uses the pool maximum.
min_machine_cpuYesFewest vCPUs one of this project's machines can request; null uses the pool minimum.
max_total_machinesYesMost live machines this project can have from the pool; null means only the pool limit applies.
default_machine_cpuYesDefault vCPUs for this project's machines from the pool; null uses the pool default.
max_total_memory_mbYesMost memory in MB across this project's live pool machines; null means only the pool limit applies.
max_machine_memory_mbYesMost memory in MB one of this project's machines can request; null uses the pool maximum.
min_machine_memory_mbYesLeast memory in MB one of this project's machines can request; null uses the pool minimum.
default_machine_memory_mbYesDefault memory in MB for this project's machines from the pool; null uses the pool default.
delete_after_idle_minutesYesIdle minutes before deleting a machine created through this grant. Zero disables deletion for this grant; null inherits the pool default.
default_machine_env_overlayYesEnv 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_overlayYesSecret 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_overlayYesProvider options layered over the pool's for this project's machines.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.1.10
    • changedInput schema / properties / delete_after_idle_minutes / description
      Previous value: -"Idle minutes before deleting a machine created through this grant. Use 0 to disable for this grant; omit to inherit the pool default. Values from 1 through 4 are invalid."New value: +"Idle minutes before deleting a machine created through this grant. Use 0 to disable for this grant; omit to inherit the pool default."
    • changedInput schema / properties / description / description
      Previous value: -"Optional note about this grant."New value: +"Free-form note stored with the grant."
    • changedInput schema / properties / metadata / description
      Previous value: -"Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 characters, values must be strings of up to 512 characters."New value: +"Arbitrary key-value labels stored with the resource."
    • removedInput schema / properties / metadata / x-go-type
      Removed value: -"resourcemeta.Metadata"
    • removedInput schema / properties / metadata / x-go-type-import
      Removed value: -{
      -  "path": "github.com/omnara-ai/omnara/internal/resourcemeta"
      -}
    • removedInput schema / properties / metadata / x-go-type-skip-optional-pointer
      Removed value: -true
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "MachinePoolID": {
      +      "description": "Machine pool ID (mpo_...).",
      +      "pattern": "^mpo_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "Metadata": {
      +      "additionalProperties": {
      +        "maxLength": 512,
      +        "type": "string"
      +      },
      +      "description": "Arbitrary key-value labels stored with the resource.",
      +      "maxProperties": 16,
      +      "propertyNames": {
      +        "maxLength": 64,
      +        "minLength": 1
      +      },
      +      "type": "object"
      +    },
      +    "OrganizationID": {
      +      "pattern": "^org_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "ProjectID": {
      +      "description": "Project ID (proj_...).",
      +      "pattern": "^proj_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "ProjectMachinePoolGrantID": {
      +      "pattern": "^pmpg_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "Timestamp": {
      +      "format": "date-time",
      +      "type": "string"
      +    }
      +  },
      +  "properties": {
      +    "created_at": {
      +      "$ref": "#/$defs/Timestamp",
      +      "description": "When the grant was created."
      +    },
      +    "default_cwd": {
      +      "description": "Working directory for this project's machines from the pool; empty uses the pool default.",
      +      "type": "string"
      +    },
      +    "default_machine_cpu": {
      +      "description": "Default vCPUs for this project's machines from the pool; null uses the pool default.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 1,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "default_machine_env_overlay": {
      +      "additionalProperties": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "description": "Env overlay merged over the pool's default_machine_env for machines materialized through this grant; a null entry removes the key.",
      +      "type": "object"
      +    },
      +    "default_machine_memory_mb": {
      +      "description": "Default memory in MB for this project's machines from the pool; null uses the pool default.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 1,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "default_machine_provider_options_overlay": {
      +      "additionalProperties": true,
      +      "description": "Provider options layered over the pool's for this project's machines.",
      +      "type": "object"
      +    },
      +    "default_machine_secret_env_overlay": {
      +      "additionalProperties": {
      +        "pattern": "^sec_[a-z2-7]{26}$",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "description": "Secret env overlay merged over the pool's default_machine_secret_env for machines materialized through this grant; a null entry removes the key.",
      +      "type": "object"
      +    },
      +    "delete_after_idle_minutes": {
      +      "description": "Idle minutes before deleting a machine created through this grant. Zero disables deletion for this grant; null inherits the pool default.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 0,
      +      "oneOf": [
      +        {
      +          "const": 0
      +        },
      +        {
      +          "maximum": 2147483647,
      +          "minimum": 5,
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "description": {
      +      "description": "Free-form note about the grant; empty if none was set.",
      +      "type": "string"
      +    },
      +    "id": {
      +      "$ref": "#/$defs/ProjectMachinePoolGrantID",
      +      "description": "Identifies the pool grant."
      +    },
      +    "machine_pool_id": {
      +      "$ref": "#/$defs/MachinePoolID",
      +      "description": "Pool the project may create machines from."
      +    },
      +    "max_machine_cpu": {
      +      "description": "Most vCPUs one of this project's machines can request; null uses the pool maximum.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 1,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "max_machine_memory_mb": {
      +      "description": "Most memory in MB one of this project's machines can request; null uses the pool maximum.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 1,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "max_total_cpu": {
      +      "description": "Most vCPUs across this project's live pool machines; null means only the pool limit applies.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 0,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "max_total_machines": {
      +      "description": "Most live machines this project can have from the pool; null means only the pool limit applies.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 0,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "max_total_memory_mb": {
      +      "description": "Most memory in MB across this project's live pool machines; null means only the pool limit applies.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 0,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "metadata": {
      +      "$ref": "#/$defs/Metadata",
      +      "description": "Key-value metadata attached to the grant."
      +    },
      +    "min_machine_cpu": {
      +      "description": "Fewest vCPUs one of this project's machines can request; null uses the pool minimum.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 0,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "min_machine_memory_mb": {
      +      "description": "Least memory in MB one of this project's machines can request; null uses the pool minimum.",
      +      "format": "int32",
      +      "maximum": 2147483647,
      +      "minimum": 0,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "org_id": {
      +      "$ref": "#/$defs/OrganizationID",
      +      "description": "Organization that owns the grant."
      +    },
      +    "project_id": {
      +      "$ref": "#/$defs/ProjectID",
      +      "description": "Project the grant lets create machines from the pool."
      +    },
      +    "updated_at": {
      +      "$ref": "#/$defs/Timestamp",
      +      "description": "When the grant last changed."
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "org_id",
      +    "project_id",
      +    "machine_pool_id",
      +    "description",
      +    "default_machine_cpu",
      +    "default_machine_memory_mb",
      +    "default_machine_env_overlay",
      +    "default_machine_secret_env_overlay",
      +    "default_machine_provider_options_overlay",
      +    "default_cwd",
      +    "max_total_machines",
      +    "max_total_cpu",
      +    "max_total_memory_mb",
      +    "min_machine_cpu",
      +    "min_machine_memory_mb",
      +    "max_machine_cpu",
      +    "max_machine_memory_mb",
      +    "delete_after_idle_minutes",
      +    "metadata",
      +    "created_at",
      +    "updated_at"
      +  ],
      +  "type": "object"
      +}
  2. Changed15 schema fields changedv0.1.1
    • addedInput schema / properties / default_cwd / description
      Added value: +"Default working directory for processes on this project's machines from the pool."
    • addedInput schema / properties / default_machine_cpu / description
      Added value: +"Default CPU count for machines this project creates from the pool, overriding the pool's default."
    • addedInput schema / properties / default_machine_memory_mb / description
      Added value: +"Default memory in MB for machines this project creates from the pool, overriding the pool's default."
    • addedInput schema / properties / default_machine_provider_options_overlay / description
      Added value: +"Provider-specific options layered over the pool's provider options for this project's machines."
    • addedInput schema / properties / description / description
      Added value: +"Optional note about this grant."
    • addedInput schema / properties / machine_pool_id / description
      Added value: +"Machine pool ID (mpo_...)."
    • addedInput schema / properties / max_machine_cpu / description
      Added value: +"Largest CPU count one of this project's machines can request."
    • addedInput schema / properties / max_machine_memory_mb / description
      Added value: +"Largest memory in MB one of this project's machines can request."
    • addedInput schema / properties / max_total_cpu / description
      Added value: +"Maximum total CPU across this project's live machines from the pool."
    • addedInput schema / properties / max_total_machines / description
      Added value: +"Maximum number of live machines this project can have from the pool."
    • addedInput schema / properties / max_total_memory_mb / description
      Added value: +"Maximum total memory in MB across this project's live machines from the pool."
    • addedInput schema / properties / min_machine_cpu / description
      Added value: +"Smallest CPU count one of this project's machines can request."
    • addedInput schema / properties / min_machine_memory_mb / description
      Added value: +"Smallest memory in MB one of this project's machines can request."
    • addedInput schema / properties / orgID / description
      Added value: +"Organization ID (org_...)."
    • addedInput schema / properties / projectID / description
      Added value: +"Project ID (proj_...)."
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations mark this as a non-readOnly, non-destructive, non-idempotent mutation, and the description adds substantial context beyond that: no machines are materialized, idempotency keys live only as long as the grant, replays compare against the current grant, and edits can produce 409 idempotency_key_conflict. The idempotency-key mechanism does not contradict idempotentHint=false (the tool is not naturally idempotent; keys are an opt-in), but it stops short of stating required auth or what happens when caps exceed the pool's limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core effect and the "no machines are created" caveat are front-loaded, and every sentence carries non-obvious information. The final idempotency sentence is dense and could be split, but no wording is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 19-parameter mutation with a rich schema and a published output schema, the description covers the essentials an agent cannot get from structured fields: no side-effect machines, idempotency lifetime, retry hazards, and the 409 failure mode. Return-value explanation is correctly omitted because the output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% across 19 parameters, so the baseline is 3; the description earns the extra point by characterizing the optional parameter family as per-project defaults and usage caps and by stating they operate "within the pool's limits," a constraint the schema itself does not express.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Lets a project create machines from a machine pool, optionally with its own defaults and usage caps... and returns the grant" states a specific verb (grant/create), resource (machine pool → project), and outcome. It is distinguishable from grant_pools_edit/delete by the creation framing, but it never names a sibling explicitly, so the reader must infer the boundary from the name prefix.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does supply situational context — "No machines are created by this call" and the retry-after-revoke warning tell an agent when this call is safe or dangerous. However, it gives no explicit routing to grant_pools_edit for later changes or grant_pools_delete for revocation, and no prerequisites are stated, so selection guidance is implied rather than spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.