Skip to main content
Glama

Authorize a worker on your site (step 1 of 2)

prepare_site_authorization
Read-onlyIdempotent

Some jobs, like the credentialed construction-safety jobs in Los Angeles, are open only to a worker whose credential a person has checked AND whom the site itself has authorized. This is how the site says so. You are the contractor that posted the job, or a wallet that contractor named as its acceptor, and you sign that ONE worker wallet may be on your site for THIS job. FREE, a signed statement, no fee, no gas, no money moves. It holds for that wallet on that job alone, never for another job or another person, and you can withdraw it the same way (pass revoke true). The house, the worker, a stranger and a payer who only pays for the job and accepts its proof are refused here, and nothing is signed for them: the signer must be the poster or the wallet the poster named. A job that needs a permit stays closed whatever you sign, and it does not check the worker's credential, which the worker records themselves. Never put a phone number, an email or an address in the note. Returns MESSAGE_TO_SIGN and BODY_JSON; sign with the authorizer wallet's personal_sign, then call submit_site_authorization within 5 minutes. Cost and signer: free, no gas; the person signs the result with their own wallet or passkey, and the house never holds a key.

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": {
      "workId": "<workId>",
      "authorizerWallet": "<authorizerWallet>",
      "workerWallet": "<workerWallet>"
    },
    "name": "prepare_site_authorization"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoOptional, up to 200 characters: one plain sentence for your own record. Never a phone number, an email or an address.
revokeNoPass true to withdraw this worker's authorization on this job. Leave out to give it.
workIdYesThe packet id of the job the worker will do on your site.
workerWalletYesThe 0x… address of the one worker you are authorizing. The worker gives you this. Address only, never a private key.
authorizerWalletYesThe 0x… address that signs: the wallet that posted the job, or the acceptor its poster named. Address only, never a private key.

Output Schema

NameRequiredDescriptionDefault
okNo
toolNo
fundedNo
payUsdNo
workIdNo
claimIdNo
claimableNo
next_callNo
proofRuleNo
fulfillableByNo
definitionOfDoneNo
needs_from_callerNo
notClaimableReasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / authorizerWallet / description
      Previous value: -"The 0x… address that signs: the wallet that posted the job, or the acceptor it names. Address only, never a private key."New value: +"The 0x… address that signs: the wallet that posted the job, or the acceptor its poster named. Address only, never a private key."
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Far beyond the annotations, it discloses cost (free, no gas, no money moves), scope (that wallet on that job only, never another job or person), revocation via revoke=true, the 5-minute signing window, and the caveat that a permit-requiring job stays closed regardless. It also clarifies that this tool only produces an unsigned message, which is what makes the readOnlyHint=true annotation coherent.

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

Conciseness3/5

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

The key scoping facts are front-loaded, but the prose is dense and repetitive: cost is stated once mid-paragraph ('FREE... no fee, no gas, no money moves') and again at the end ('Cost and signer: free, no gas'). Several sentences chain multiple constraints together, hurting skim-ability for a tool this consequential.

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 5-parameter preparation tool with an output schema, it covers signer authority, refusal cases, revocation, expiry window, and the credential/permit caveats. An agent has everything needed to decide whether it may call this and what to do with the result.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents every parameter, including the note character limit and the revoke semantics. The description reinforces the signer-authority rule for authorizerWallet and the no-PII rule for note, but adds little mechanical detail the schema lacks. Baseline 3 applies when the schema does the heavy lifting.

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: the site authorizes one named worker wallet to be on the contractor's site for one specific job. It also pins down the exact workflow step ('Returns MESSAGE_TO_SIGN and BODY_JSON... then call submit_site_authorization'), which separates it from the submit_ and status siblings without ambiguity.

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 names exactly who may call it (the poster or the wallet the poster named as acceptor) and explicitly refuses the house, the worker, a stranger, and a payer-only wallet. It also gives the follow-up step and the 5-minute window. What it omits is a pointer to sibling tools such as site_authorization_status for checking whether an authorization already exists before preparing another.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources