Skip to content
GasketDocs

Tools

How an agent reaches your systems, and how Gasket calls your endpoints.

A tool is an HTTPS endpoint you own, added on the agent's Tools tab. You give it a name and description (what the model sees), a JSON Schema for its input, and a service.operation that the policy decides on.

What Gasket sends

request to your tool
POST https://your-api.com/gasket/lookup-order
Content-Type: application/json
Gasket-Signature: t=1760532068,v1=5f1c…
Gasket-Action: act_...

{
  "tool": "lookup_order",
  "input": { "order_id": "4821" },
  "run_id": "run_...",
  "action_id": "act_...",
  "agent_id": "agt_...",
  "environment": "test"
}

Return any 2xx with a body (JSON or text, up to 8 KB); it goes to the model as the tool result. Anything else, or no answer within 15 seconds, is reported to the model as a failure, and the action is recorded as failed.

Verify the signature

Every tool request is signed with the agent's signing secret (shown on the Tools tab). Reject requests that don't verify.

verify.js
import crypto from "node:crypto";

// header: the Gasket-Signature header, "t=<unix seconds>,v1=<hex>"
// body:   the raw request body, exactly as received
export function verifyGasket(header, body, secret) {
  const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  if (!t || !v1 || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${body}`).digest("hex");
  return expected.length === v1.length && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}

Rules for tool URLs

  • https:// only, on the default port.
  • Must resolve to a public address (no localhost, private or internal networks).
  • Redirects aren't followed.

Policy

Each tool call becomes an action decided by the agent's policy before Gasket sends anything. Allowed: Gasket calls your endpoint. Denied: the model is told it was refused. Needs approval: the run pauses until a person decides.

Something wrong or missing? Tell us · Stuck? Help center