Skip to main content
Glama
usegranthq

UseGrant MCP Server

Official
by usegranthq

create_access_token

Generate a new access token for a client using specified parameters like provider ID, client ID, and expiration time. Essential for authenticating and managing access on the UseGrant MCP Server.

Instructions

Create a new access token for a client

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audienceAsArrayNoWhether to use an array of audiences
clientIdYesThe ID of the client
expiresInNoThe number of seconds the token will be valid for
forceDefaultDomainNoWhether to force the default domain
providerIdYesThe ID of the provider
useJwtTypeNoWhether to use at+jwt token type in the header

Implementation Reference

  • MCP tool handler: destructures providerId, clientId, payload; calls usegrant.createToken; returns JSON-formatted token as text content.
    async ({ providerId, clientId, ...payload }) => {
      const token = await usegrant.createToken(providerId, clientId, payload);
      return {
        content: [{ type: 'text', text: JSON.stringify(token, null, 2) }],
      };
    },
  • Input schema for the tool, combining ProviderIdSchema, ClientIdSchema, and CreateTokenSchema.shape from UgSchema.
    {
      providerId: UgSchema.ProviderIdSchema,
      clientId: UgSchema.ClientIdSchema,
      ...UgSchema.CreateTokenSchema.shape,
    },
  • src/index.ts:197-211 (registration)
    Registration of the create_access_token tool on the MCP server with name, description, input schema, and handler function.
    server.tool(
      'create_access_token',
      'Create a new access token for a client',
      {
        providerId: UgSchema.ProviderIdSchema,
        clientId: UgSchema.ClientIdSchema,
        ...UgSchema.CreateTokenSchema.shape,
      },
      async ({ providerId, clientId, ...payload }) => {
        const token = await usegrant.createToken(providerId, clientId, payload);
        return {
          content: [{ type: 'text', text: JSON.stringify(token, null, 2) }],
        };
      },
    );
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It lacks critical behavioral details: whether this is a write operation (implied but not explicit), authentication requirements, rate limits, token format, or what happens on success/failure. For a security-sensitive token creation tool, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized and front-loaded, with every word earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter tool with no annotations and no output schema, the description is inadequate. It doesn't explain what the tool returns (token format, expiration), error conditions, or security implications. Given the complexity and lack of structured data, more context is needed for the agent to use this tool effectively.

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 parameters are fully documented in the schema. The description adds no additional parameter context beyond what's in the schema (e.g., explaining relationships between parameters like 'providerId' and 'clientId'). Baseline 3 is appropriate when schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('access token for a client'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'create_client' or 'create_provider' beyond the resource type, missing explicit sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing an existing client), exclusions, or contextual triggers, leaving the agent to infer usage from the tool name alone.

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

Related 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/usegranthq/mcp-server'

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