Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
writ_checkA

Ask Writ whether an action may proceed. CALL THIS BEFORE any consequential write.

A consequential write is anything hard to undo: sending money or messages, changing access or identity records, deleting data, calling an external API that acts in the world.

Args: sponsor_id: The human sponsor accountable for this action (e.g. a user id or email). agent_id: The agent or workflow performing the action. verb: What is being done (e.g. "verify_human", "send_payment"). target: What it acts on (e.g. "benefit-case-123"). purpose: Why, in plain words. Be specific — the approval is bound to this purpose. environment: Optional policy environment: "dev", "staging", or "prod". The check runs against that environment's policy override (verbs it doesn't override inherit the tenant default). Omit for the tenant default. An unknown name denies fail-closed — never silently falls back.

Returns a decision: ALLOW — proceed. You get an authToken valid 90 seconds, bound to this exact sponsor/agent/verb/target/purpose. Call writ_verify_token against the intended write immediately before executing it. DENY — do NOT perform the action. Explain the receipt reason to the user. STEP_UP — a human sponsor must approve first. Tell the user what needs approval; they can approve via writ_grant (or the dashboard), then call writ_check again. Every outcome creates an audit receipt with a receiptId.

writ_verify_tokenA

Verify a Writ auth token against the write you are about to execute.

Call this IMMEDIATELY before executing an ALLOWed write, with the exact verb/target/purpose you intend. If valid is false — expired, tampered, or bound to a different purpose — do NOT execute the write; call writ_check again.

This is the point-of-action enforcement: the check authorizes, the token proves the authorization still matches what you are actually doing.

writ_leaseA

Convert an ALLOW token into a single-use gated-execution lease.

Call this AFTER writ_check returns ALLOW, passing that ALLOW's authToken. The lease is bound to the exact upstream request you intend to run: the same method, path, and body bytes you will later pass to writ_execute. A lease is single-use; once executed (or expired) it is spent.

Args: auth_token: The authToken from a writ_check ALLOW decision. system_id: The registered upstream system: "stripe", "github", or "salesforce". A vaulted credential must be active for this system or the gate answers ok:false. method: HTTP method of the upstream request (e.g. "POST"). path: Upstream path (e.g. "/v1/refunds"). Must match the system's allowed path patterns. body: Optional JSON object (at most 1 MB). Sent only when provided; if you lease a body you must execute the identical body. ttl_seconds: Optional lease TTL in seconds. The gate caps it at 90 and at the token's remaining life.

On success the gate answers 201 with leaseId, expiresAt, ttlSeconds, verb, target, purpose, and systemId. On failure it answers {"ok": false, "reason": ...} (token invalid or expired, or no active vaulted credential for the system). On ok:false do NOT execute.

writ_executeA

Run one gated upstream request with a lease or ALLOW token.

Pass exactly one of lease_id (from writ_lease) or auth_token (from a writ_check ALLOW). Pass the SAME method, path, and body as the lease: the gate compares the request bytes against the lease, and on any mismatch it fails closed: no upstream call is made and the answer is {"ok": false, "reason": ..., "upstreamCalled": false}.

Args: lease_id: The leaseId from writ_lease. Mutually exclusive with auth_token. auth_token: An ALLOW authToken from writ_check. Mutually exclusive with lease_id. system_id: The registered upstream system: "stripe" (default), "github", or "salesforce". method: HTTP method of the upstream request (required, e.g. "POST"). path: Upstream path (required, e.g. "/v1/refunds"). body: Optional JSON object. Must be byte-identical to the leased body. idempotency_key: Optional key passed through to the upstream system. Use it so retries are safe.

On success the gate returns the upstream system's status and body verbatim. Every outcome writes a receipt. On {"ok": false} report the reason to the user and do NOT retry with a different request: the lease is spent or invalid.

writ_grantA

SPONSOR ONLY. Mint a one-time grant approving a specific action.

Use this when writ_check returned STEP_UP and the human sponsor approves. The grant is single-use: the next writ_check consumes it and returns ALLOW. The grant is scoped to your tenant. Requires WRIT_SPONSOR_TOKEN.

writ_revokeA

SPONSOR ONLY. Kill switch: immediately deny all future checks for this principal.

Revocation overrides live grants and tenant policy. Use when a principal is compromised, misbehaving, or its task is done. Scoped to your tenant. Requires WRIT_SPONSOR_TOKEN.

writ_reinstateA

SPONSOR ONLY. Undo writ_revoke: the principal is evaluated by policy again.

Scoped to your tenant. Requires WRIT_SPONSOR_TOKEN.

writ_receiptsB

List recent decision receipts (audit trail). Newest first.

writ_verify_receiptsA

Verify the tenant audit-log hash chain and report whether it is intact.

Walks the tenant's receipt chain from its head, recomputing every visited receipt's HMAC. This is the endpoint behind ./writ verify-chain: use it to prove the audit log has not been tampered with.

Args: limit: Max receipts to verify, newest first. Default 200, clamped to the range 1..1000.

Returns the gate payload verbatim: ok (chain intact), checked (receipts verified), tip and tipReceipt (chain head), chainedFrom, legacyCount, and complete. Verification stops at legacy (pre-chain) receipts and reports them as legacyCount.

writ_policyA

Read the tenant's verb policy: which verbs allow, deny, require a grant, or step up.

writ_policiesA

List every policy object for the tenant.

Returns the gate payload verbatim: the tenant default first (scope "tenant"), then each configured per-environment override (scope "environment"), then each per-principal override (scope "principal" with principalId). Environments without an override are not listed; checks naming them evaluate against the tenant default.

writ_policy_envA

Read or set one environment's sparse policy override (dev, staging, or prod).

With policy empty: GET the override. Returns the gate payload verbatim - the sparse override in policy (only the verbs it explicitly sets; empty with version 0 when never configured), effectivePolicy (the tenant default with the override applied on top, which is what checks naming this environment evaluate against), and policyProvenance naming the winning layer (tenant or environment) per verb.

With policy given: PUT the override. Pass a JSON object string of verb to mode, e.g. '{"refund": "allow"}'. Modes: allow, deny, require_grant, step_up. The override is sparse: only the verbs you send are stored; every other verb keeps inheriting the tenant default. Every successful update bumps the override's version by one; the tenant default's version is untouched. To relax a verb in one environment, set it to "allow".

Args: environment: dev, staging, or prod. Validated client-side; anything else returns an error JSON without calling the gate. policy: JSON object string of verbs to modes, e.g. '{"refund": "allow"}'. Empty string (default) reads instead. Bad JSON, unknown verbs, or unknown modes return an error JSON without calling the gate.

Returns the gate payload verbatim on success; on failure an error JSON with error, status, and detail.

writ_policy_principalA

Read or set one principal's sparse policy override (the top policy layer).

With policy empty: GET the override. Returns the gate payload verbatim - the sparse override in policy (only the verbs it explicitly sets; empty with version 0 when never configured), effectivePolicy it resolves to, and policyProvenance naming the winning layer (principal, environment, or tenant) per verb. Pass environment to fold that environment's override into the middle layer, exactly as a check naming it would evaluate. Tombstoned principals still return 200 with "inert": true - they stay resolvable forever, but their override never supplies a mode while the principal is deleted or disabled. A principalId from another tenant is 404.

With policy given: PUT the override. Pass a JSON object string of verb to mode, e.g. '{"refund": "step_up"}'. Modes: allow, deny, require_grant, step_up, and inherit - sending {"refund": "inherit"} removes that verb from the principal's override so it inherits downward again. The override is sparse: only the verbs you send are stored, and every successful update bumps the override's version by one. Fail closed: configuring policy on a tombstoned or disabled principal is 400 (principal_inactive); an identity that cannot authorize checks cannot carry policy either.

Args: principal_id: The principal (prn_...) whose override to read or set. policy: JSON object string of verbs to modes, e.g. '{"refund": "step_up"}'. Empty string (default) reads instead. Bad JSON, unknown verbs, or unknown modes return an error JSON without calling the gate. environment: Optional dev, staging, or prod for the read; appends ?environment= so the effective policy and provenance fold that environment's override into the middle layer. Anything else returns an error JSON without calling the gate.

Returns the gate payload verbatim on success; on failure an error JSON with error, status, and detail.

writ_meA

Who the configured API key is acting as.

This is the Writ "who am I": returns who the configured API key belongs to (tenant id and name, key email and plan), the policy summary, and the monthly receipt usage (monthlyChecks). Never returns the raw key.

Returns the gate payload verbatim: tenant (id, name), key (email, plan), policy (per-verb modes), and monthlyChecks. Free tier is 10,000 receipts/month; checks return 402 payment_required once it is exhausted or billing is past due.

writ_sandboxB

Get a free 90-second sandbox grant for a demo write. No API key needed.

Issues a live grant for verb "demo_write" on a target starting with "demo-", then runs writ_check so you get back an ALLOW decision plus auth token to practice the verify-before-write flow end to end.

writ_github_installationsA

List the GitHub App installations for this tenant.

Returns each installation's id, status, PR-comment bot setting, and the per-installation check-run fail threshold (checkFailUngated). Use this to discover installation ids before calling writ_github_set_threshold or writ_github_toggle_pr_comments.

writ_github_set_thresholdA

Set the per-installation check-run fail threshold.

A positive number N makes the GitHub check run fail when the ungated-site count is greater than N; a zero-ungated scan passes. Omit threshold (or set it to None) to clear the override and restore neutral-only check runs.

writ_github_toggle_pr_commentsA

Enable or disable the optional PR-comment bot for a GitHub App installation.

Default is OFF. No TOTP step-up is required. Use writ_github_installations to find installation_id.

writ_manifestsA

List scanned repos and their risk profiles, or fetch one manifest.

With no repo_id, returns a table of repos with writScore, scanStatus, and riskDigest (counts per risk class). With repo_id, returns the full signed manifest for that repo.

writ_scanA

Scan a local directory for consequential writes (no gate call).

LOCAL-ONLY: this tool never calls the Writ gate, needs no API key, and never rewrites files. It runs the pywrit scanner in-process over the directory: Python (ast, always available), plus TypeScript/JavaScript and Go (tree-sitter, scan-only exactly as the CLI reports them - the scanner never instruments those files).

Prerequisite: the pywrit scanner must be installed in the same Python environment as this server; TS/JS and Go parsing additionally needs the polyglot extra:

pip install "pywrit[polyglot]"

Args: path: Directory to scan (test files and vendored trees are skipped). include_non_product: Also report writes under docs/, scripts/, examples/, sandbox/, benchmark/, demo/, and build-tooling files. Default False: they are counted under per-language "suppressed" totals instead of becoming findings (never silently dropped). max_findings: Findings list cap (default 25, minimum 1). When the cap cuts the list, "findingsTruncated" carries the count left out.

Returns a summary: path, per-language files/sites/gated counts, suppressed non-product totals by class, notScanned per language when the polyglot extra is missing (files seen, none scanned), a verdict line, and findings capped at max_findings: [{file (relative to the scanned root), line, kind, function, class, verb, snippet}] sorted by file then line. On error returns {error, status, detail}.

writ_explain_receiptA

Fetch a receipt and explain it in plain language.

Use this to understand why a writ_check returned ALLOW, DENY, STEP_UP, or REVOKED. Returns the receipt with a human-readable breakdown.

writ_tenant_notifyB

Get or update step-up notification settings.

With no arguments, returns the current settings. With arguments, updates them: step_up_email enables/disables step-up emails; step_up_webhook_url sets a generic or Slack webhook URL; use an empty string to clear.

writ_principalsB

List the tenant's principals (identity directory).

writ_verbsA

List the tenant's verb vocabulary, including custom verbs.

writ_keysA

List API key metadata for the tenant (never raw keys).

writ_badge_tokenA

Mint a public badge token for the tenant and return its embed snippet.

The badge renders the tenant's live gated-write count over the trailing 30 days. The token is shown exactly once: store it, it is needed to revoke the badge. It is public by design (it lives in a README image URL) and cannot be used as an API key. See https://docs.withwrit.com/readme-badge for the verification model.

Args: label: Optional private label for your own bookkeeping (max 40 chars, letters/digits/space/_/.-). Never rendered on the badge.

Returns the gate payload verbatim: badgeToken (writ_badge_...), badgeUrl, markdown (ready-to-paste README snippet), label, and a note.

writ_badge_revokeA

Revoke one of the tenant's badge tokens.

Its badge image URL 404s from that moment on, so embeds show a broken image rather than a stale claim. Only tokens belonging to the caller's tenant can be revoked.

Args: badge_token: The writ_badge_ token to revoke (shown once at mint time).

writ_tenant_inviteA

Mint a team invite code (writ_inv_...) for your tenant.

Share the code with teammates: they pass it as invite_code to writ_join_tenant (POST /v1/keys) to join this tenant instead of creating their own. Creating a new code ROTATES and invalidates the old one, so there is only ever one live invite code per tenant, and only mint when the team needs a fresh code.

Returns the gate payload verbatim: inviteCode, tenantId, and a note.

writ_join_tenantA

Join an existing Writ tenant with a team invite code. No API key needed.

This is the join flow: the endpoint is unauthenticated (the caller has no key yet, that is the point) and issues a fresh API key on the invited tenant instead of creating a new one. This tool is not general key issuance: invite_code is required.

Args: email: Contact email for the new key. invite_code: The team's live writ_inv_... code (from writ_tenant_invite, shared by a teammate). tenant_name: Optional display name; only sent when non-empty.

Returns the gate payload verbatim: apiKey, tenantId, plan, monthlyChecks, defaultPolicy, and sponsorToken only when present. Store the apiKey immediately: it is shown once. Joining members receive NO sponsor token; only the first key of a brand-new tenant does. If a sponsorToken IS present, store it too: it is never recoverable and it approves grants and operates the kill switch. The gate rate-limits key issuance to 10 keys per hour per client IP.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 29 tools

Disambiguation3/5

Most tools map to distinct resources or steps (check, verify_token, lease, execute form a clear chain), but writ_policy and writ_policies both read policy and are easy to confuse. The dual-mode read/write tools (writ_policy_env, writ_policy_principal) also blur whether they read or mutate.

Naming Consistency4/5

All tools use a consistent writ_ snake_case prefix, which is predictable. There is a minor mix of noun-style (writ_policies, writ_keys, writ_verbs) and verb-style (writ_check, writ_execute) names, but within each functional group it is coherent.

Tool Count3/5

29 tools is on the heavy side, exceeding the 16-25 'feels heavy' band. The breadth is justified by covering policy, enforcement, audit, GitHub integration, badges, and team management, but the surface is large enough to feel sprawling for an agent.

Completeness4/5

The authorization lifecycle is well covered: check, verify, lease, execute, grant/revoke/reinstate, receipts plus chain verification, and three policy layers. Minor gaps remain, such as no explicit API-key revocation or principal creation/removal tools.

Maintenance

ActivityActive
ResponsivenessMixed handling