Skip to main content
Glama

Create Temporary Role-DAG Organization

create_org
Idempotent

Creates a bounded-budget, time-boxed organization, validates its acyclic role dependency graph and budget cap, then atomically locks escrow for role payouts.

Instructions

Create a bounded-budget, time-boxed LID Organization, compile and validate its acyclic Role-DAG (checking role dependencies and ensuring sum of role budgets <= budgetCapMinor), and atomically record a LOCK entry in the append-only minor-unit escrow ledger. Root tasks with no upstream dependencies open immediately. Requires an existing principalId — call create_sandbox_principal first for sandbox USD demos/testing, or supply an existing Principal ID. Important: place exportFields inside role.acceptance.exportFields (alongside jsonSchema/geoOtp/requirePrincipalApproval), not directly on the role object. Provide a deterministic idempotencyKey to safely retry without locking escrow twice. Returns 400 on cyclic DAGs or budget overflows, and 404 if principalId does not exist.

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": {
      "orgSpec": "<orgSpec>"
    },
    "name": "create_org"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgSpecYesComplete organization specification including `principalId`, `title`, `currency` ("USD" or "USDC"), integer `budgetCapMinor` (cents), `ttlSeconds`, and 1–32 acyclic `roles` (with `exportFields` nested inside each role’s `acceptance` object).
idempotencyKeyNoOptional deterministic idempotency key (e.g. "org-burst-pipe-001") preventing duplicate organization creation or double escrow locks on retry.
principalAuthTokenNoOptional Principal secret token (`x-principal-token`). Include only in Principal-authorized sessions when private notes or plaintext on-site OTPs should be returned in the response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.2
    • changedInput schema / properties / orgSpec / description
      Previous value: -"Complete organization specification including `principalId`, `title`, `currency` (\"USD\" or \"USDC\"), integer `budgetCapMinor` (cents), `ttlSeconds`, and 1–32 acyclic `roles`."New value: +"Complete organization specification including `principalId`, `title`, `currency` (\"USD\" or \"USDC\"), integer `budgetCapMinor` (cents), `ttlSeconds`, and 1–32 acyclic `roles` (with `exportFields` nested inside each role’s `acceptance` object)."
    • changedInput schema / properties / orgSpec / properties / roles / items / description
      Previous value: -"Single role node inside an organization Role-DAG."New value: +"Single role node inside an organization Role-DAG. Place verification gates and exportFields inside `acceptance` (not at the top level of the role object)."
    • changedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / description
      Previous value: -"Deterministic verification gate specification for a role. At least one of jsonSchema, geoOtp, or requirePrincipalApproval must be enabled."New value: +"Deterministic verification gate specification for a role (jsonSchema, geoOtp, holdback, requirePrincipalApproval, exportFields, minTrustScore). At least one of jsonSchema, geoOtp, or requirePrincipalApproval must be enabled."
  2. Changed49 schema fields changedv0.1.1
    • addedInput schema / properties / idempotencyKey / description
      Added value: +"Optional deterministic idempotency key (e.g. \"org-burst-pipe-001\") preventing duplicate organization creation or double escrow locks on retry."
    • addedInput schema / properties / idempotencyKey / maxLength
      Added value: +128
    • addedInput schema / properties / idempotencyKey / minLength
      Added value: +1
    • addedInput schema / properties / orgSpec / description
      Added value: +"Complete organization specification including `principalId`, `title`, `currency` (\"USD\" or \"USDC\"), integer `budgetCapMinor` (cents), `ttlSeconds`, and 1–32 acyclic `roles`."
    • addedInput schema / properties / orgSpec / properties / autoCloseOnComplete / description
      Added value: +"If true, automatically closes the organization and refunds unused contingency escrow once all tasks and holdbacks settle."
    • addedInput schema / properties / orgSpec / properties / budgetCapMinor / description
      Added value: +"Hard escrow cap locked at creation in integer cents (must be >= sum of all role budgets)."
    • addedInput schema / properties / orgSpec / properties / currency / description
      Added value: +"Settlement currency code: \"USD\" (sandbox) or \"USDC\" (live Base Mainnet USDC)."
    • addedInput schema / properties / orgSpec / properties / description / description
      Added value: +"Optional overview of the organization goal."
    • addedInput schema / properties / orgSpec / properties / principalId / description
      Added value: +"ID of the Principal funding and owning this organization (e.g. \"pri_...\")."
    • addedInput schema / properties / orgSpec / properties / principalPrivateNotes / description
      Added value: +"Confidential Principal notes that are strictly redacted from workers and unauthenticated callers."
    • addedInput schema / properties / orgSpec / properties / roles / description
      Added value: +"Acyclic list of 1 to 32 Role-DAG steps with budgets, dependencies, and deterministic acceptance gates."
    • addedInput schema / properties / orgSpec / properties / roles / items / description
      Added value: +"Single role node inside an organization Role-DAG."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / description
      Added value: +"Deterministic verification gate specification for a role. At least one of jsonSchema, geoOtp, or requirePrincipalApproval must be enabled."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / exportFields / description
      Added value: +"Whitelist of top-level payload keys exported as untrusted-marked artifacts to dependent downstream tasks."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / geoOtp / description
      Added value: +"Optional physical Geo + Photo + OTP deterministic gate."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / geoOtp / properties / maxDistanceMeters / description
      Added value: +"Maximum allowed Haversine distance in meters from target coordinates (e.g. 150)."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / geoOtp / properties / maxLocationAgeSeconds / description
      Added value: +"Maximum allowed age in seconds for the GPS capture timestamp."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / geoOtp / properties / requireOtp / description
      Added value: +"Whether the Principal on-site 6-digit OTP code is required."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / geoOtp / properties / requirePhotoProof / description
      Added value: +"Whether at least one photo proof with SHA-256 digest is required."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / geoOtp / properties / targetLat / description
      Added value: +"Target site latitude in decimal degrees (-90 to 90)."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / geoOtp / properties / targetLng / description
      Added value: +"Target site longitude in decimal degrees (-180 to 180)."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / holdback / description
      Added value: +"Optional holdback split applied when funds are released."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / holdback / properties / bps / description
      Added value: +"Holdback percentage in basis points (100 bps = 1%, e.g. 2000 = 20%)."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / holdback / properties / durationSeconds / description
      Added value: +"Holdback maturity window in seconds before automatic undisputed release (e.g. 86400 for 24h)."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / jsonSchema / description
      Added value: +"Optional JSON Schema (draft-07/2020-12) validated deterministically via Ajv against submission payloads."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / minTrustScore / description
      Added value: +"Optional minimum deterministic participant Trust Score (0-100) required to claim this task."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / acceptance / properties / requirePrincipalApproval / description
      Added value: +"If true, passing deterministic gates moves the task to AWAITING_PRINCIPAL_APPROVAL instead of releasing funds automatically."
    • removedInput schema / properties / orgSpec / properties / roles / items / properties / budgetMinor / $ref
      Removed value: -"#/properties/orgSpec/properties/budgetCapMinor"
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / budgetMinor / description
      Added value: +"Role payout amount in integer minor units / cents (e.g. 5000 = $50.00)."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / budgetMinor / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / budgetMinor / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / budgetMinor / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / budgetMinor / type
      Added value: +"integer"
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / claimTtlSeconds / description
      Added value: +"Hard claim lease TTL in seconds (30 to 604800). Expired claims automatically reopen the task."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / dependsOn / description
      Added value: +"Upstream role slugs in the DAG that must reach COMPLETED before this task unlocks to OPEN."
    • removedInput schema / properties / orgSpec / properties / roles / items / properties / dependsOn / items / $ref
      Removed value: -"#/properties/orgSpec/properties/roles/items/properties/slug"
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / dependsOn / items / maxLength
      Added value: +64
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / dependsOn / items / minLength
      Added value: +2
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / dependsOn / items / pattern
      Added value: +"^[a-z0-9]+(?:-[a-z0-9]+)*$"
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / dependsOn / items / type
      Added value: +"string"
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / description / description
      Added value: +"Detailed instructions and deliverable expectations scoped to this role."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / participantKind / description
      Added value: +"Required worker type: \"AI_AGENT\" or \"HUMAN_WORKER\"."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / requiredCapabilities / description
      Added value: +"Capability tags a participant must possess to claim this role (e.g. [\"plumbing-diagnostics\"])."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / slug / description
      Added value: +"Unique lowercase kebab-case identifier for this role within the organization (e.g. \"diagnostic-ai\")."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / taskPayload / description
      Added value: +"Scoped JSON input data visible exclusively to participants working on this role."
    • addedInput schema / properties / orgSpec / properties / roles / items / properties / title / description
      Added value: +"Human-readable title for this role step."
    • addedInput schema / properties / orgSpec / properties / title / description
      Added value: +"Short descriptive title for the temporary organization/job."
    • addedInput schema / properties / orgSpec / properties / ttlSeconds / description
      Added value: +"Hard organization TTL in seconds before automatic expiry and escrow refund."
    • changedInput schema / properties / principalAuthToken / description
      Previous value: -"Optional Principal auth token (required only if viewing private principal fields/OTPs)."New value: +"Optional Principal secret token (`x-principal-token`). Include only in Principal-authorized sessions when private notes or plaintext on-site OTPs should be returned in the response."
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that escrow is atomically locked, root tasks open immediately, cyclic DAGs and budget overflows return 400, missing principals return 404, and idempotencyKey prevents double locking. It also highlights the non-obvious exportFields placement inside role.acceptance, which is valuable behavioral context for an agent constructing the payload.

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 description is a single dense paragraph but is front-loaded with the core action and key constraints. Nearly every sentence carries operational information, though some jargon-heavy phrasing could be tightened.

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

Completeness4/5

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

For a complex creation tool with nested roles, DAG validation, and escrow locking, the description covers prerequisites, error cases, idempotency, and the main payload pitfall. With no output schema, it could say more about the success response shape, but it is otherwise complete enough to call correctly.

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%, so parameter meanings are already documented. The description adds meaningful guidance beyond the schema by emphasizing that exportFields must be nested inside role.acceptance and that the sum of role budgets must be <= budgetCapMinor.

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

Purpose5/5

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

The description states a specific verb and resource: create a bounded-budget, time-boxed LID Organization, compile and validate its acyclic Role-DAG, and record an escrow LOCK. It clearly separates this from the sibling prerequisite create_sandbox_principal by naming that tool and its role.

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

Usage Guidelines4/5

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

It gives explicit prerequisite guidance: an existing principalId is required, and create_sandbox_principal should be called first for sandbox USD demos/testing. It also explains retry behavior via idempotencyKey. It does not explicitly state when not to use this tool, but the conditions for correct use are clear.

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