Skip to main content
Glama

token_create

Issue a signed security token for an agent, scoped to a resource type and permission level, with automatic expiry.

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")
Behavior5/5

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

Since no annotations are provided, the description bears full responsibility. It discloses that each call produces a unique token with fixed expiry, and returns specific success/error structures. It also notes the token manager availability as a failure scenario.

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 starting with purpose, then details, but is slightly verbose. Every sentence serves a purpose, though it could be tightened slightly.

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?

Given 3 required parameters and no output schema, the description fully covers return values, error scenarios, usage notes, and related tools. It is complete and actionable.

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%, so baseline is 3. The description adds value by explaining resource_type as a free-form string with examples and scope as permission controls, going beyond the 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 verb 'Issue' and the resource 'security token', with specifics about signing (HMAC/Ed25519), agent scoping, and permission levels. It distinguishes from siblings by naming token_validate and token_revoke, aiding selection.

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?

The description explains when to use (to issue a token) and provides examples for resource_type and scope. It also tells the agent how to proceed with the returned token (pass to token_validate) and when to use token_revoke, but lacks explicit when-not-to-use guidance.

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