Skip to main content
Glama

token_create

Issue a signed security token for an agent, scoped to a resource type and permission level. Each token has a fixed expiry and unique signature for access control.

Instructions

Issue a new HMAC/Ed25519-signed security token for an agent scoped to a resource type and permission level. Each call produces a unique token with a fixed expiry managed by the token manager. Returns {ok:true, token:{tokenId, agentId, resourceType, scope, issuedAt, expiresAt, signature}}. Returns {ok:false, error:"..."} if the token manager is unavailable. resource_type is a free-form string identifying the protected resource (e.g. "FILE_SYSTEM", "BLACKBOARD", "API"); scope controls permission level (e.g. "read", "write", "admin"). Pass the full returned token object as token_json to token_validate; call token_revoke with the tokenId when access should be withdrawn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent to issue the token to
resource_typeYesResource type the token grants access to (e.g. "FILE_SYSTEM")
scopeYesPermission scope (e.g. "read", "write", "admin")
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses each call produces a unique token, fixed expiry, return structure, and error condition. It explains parameter semantics (resource_type and scope) and mentions downstream usage. However, it does not mention agent existence prerequisites or rate limits.

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 well-structured: purpose first, then returns, parameter explanations, and integration tips. Each sentence adds value, though it is slightly longer than minimal. It efficiently combines multiple pieces of information without redundancy.

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?

Given the tool's complexity and absence of output schema, the description explains the return structure (success and error) and parameter semantics. It mentions integration with sibling tools. However, it lacks details like default expiry duration, whether agent_id must exist, and any authorization requirements. It is fairly complete but not exhaustive.

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%, but the description adds meaningful context: it explains that resource_type is a free-form string with examples, and scope controls permission level. It also provides usage tips (e.g., 'Pass the full returned token object as token_json to token_validate'), which adds value beyond the schema schema descriptions.

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 clearly states the tool's purpose: 'Issue a new HMAC/Ed25519-signed security token for an agent scoped to a resource type and permission level.' It specifies the verb (issue), resource (token), and constraints (scoped to resource type and permission level). It also distinguishes from sibling tools like token_validate and token_revoke by mentioning them in context.

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?

The description implicitly indicates when to use the tool (to issue tokens), but lacks explicit guidance on when not to use it or comparisons to alternatives like token_validate or token_revoke for other use cases. No preconditions or exclusion criteria are provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jovancoding/network-ai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server