Skip to main content
Glama

Derive Mutual-Auth Session

mutualAuthDeriveSession
Read-onlyIdempotent

Derive a shared mutual-auth session record from both parties' Attests, returning a deterministic session_id with certificates and expiry bounds or a failure reason.

Instructions

Derive the shared mutual-auth session record from both sides' Attests. Both parties MUST compute identical session_id given identical inputs (canonical JCS + sha256 of chosen_version, both cert ids, both nonces). Returns a MutualAuthSession with session_id + both certificates + expiry bounds, or failure reason.

Input Schema

NameRequiredDescriptionDefault
now_msNoCurrent unix ms — defaults to Date.now()
policyYesMutualAuthPolicy
is_attestYesThe information system's MutualAuthAttest
agent_attestYesThe agent's MutualAuthAttest

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "agent_attest",
      +  "is_attest",
      +  "policy"
      +]
  2. Addedv2.8.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, non-open-world), so the bar is lower. The description adds real behavioral context: the deterministic computation contract (identical session_id from identical inputs via canonical JCS + sha256 of chosen_version, both cert ids, both nonces) and the failure mode. This goes beyond what annotations disclose.

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?

Three sentences, front-loaded with the core action before the determinism detail and return value. Every sentence carries information, though the parenthetical formula is dense; it earns its place by explaining the idempotency contract.

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?

There is no output schema, but the description compensates by naming the return shape (MutualAuthSession with session_id, both certificates, expiry bounds) and the failure path. Combined with 100% schema coverage, an agent has what it needs to call the tool correctly.

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 all four parameters, establishing a baseline of 3. The description references the derivation inputs (nonces, cert ids, chosen_version) but does not map them to specific parameter names, adding only marginal meaning over the schema.

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 gives a specific verb ('Derive') and resource ('shared mutual-auth session record') and scopes it ('from both sides' Attests'). This is clearly distinct from siblings like mutualAuthBuildCertificate, mutualAuthVerifyAttest, and mutualAuthVerifyTrustBundle, which build/verify rather than derive a session.

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?

Usage is implied by the prerequisite that both parties' Attests must exist before deriving a session, but there is no explicit when-to-use statement or named alternative among the mutualAuth* siblings. An agent must infer the sequencing rather than being told it.

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

Deploy Server

Other Tools