Skip to main content
Glama

telegraph_create_account

Create a Telegraph account to manage articles programmatically. Save the returned access token for future API requests.

Instructions

Create a new Telegraph account. Returns an Account object with access_token that should be saved for future requests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
short_nameYesAccount name (1-32 characters)
author_nameNoDefault author name used when creating new articles (0-128 characters)
author_urlNoProfile link opened when users click on the author name (0-512 characters)

Implementation Reference

  • Handler for the 'telegraph_create_account' tool: parses input with CreateAccountSchema, calls telegraph.createAccount, and returns the result as JSON text content.
    case 'telegraph_create_account': {
      const input = CreateAccountSchema.parse(args);
      const result = await telegraph.createAccount(
        input.short_name,
        input.author_name,
        input.author_url
      );
      return {
        content: [{
          type: 'text' as const,
          text: JSON.stringify(result, null, 2),
        }],
      };
    }
  • Zod input schema for validating parameters of the 'telegraph_create_account' tool.
    export const CreateAccountSchema = z.object({
      short_name: z.string().min(1).max(32).describe('Account name (1-32 characters)'),
      author_name: z.string().max(128).optional().describe('Default author name (0-128 characters)'),
      author_url: z.string().max(512).optional().describe('Default profile link (0-512 characters)'),
    });
  • Tool registration definition for 'telegraph_create_account' within the accountTools export array, specifying name, description, and JSON input schema.
    {
      name: 'telegraph_create_account',
      description: 'Create a new Telegraph account. Returns an Account object with access_token that should be saved for future requests.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          short_name: {
            type: 'string',
            description: 'Account name (1-32 characters)',
            minLength: 1,
            maxLength: 32,
          },
          author_name: {
            type: 'string',
            description: 'Default author name used when creating new articles (0-128 characters)',
            maxLength: 128,
          },
          author_url: {
            type: 'string',
            description: 'Profile link opened when users click on the author name (0-512 characters)',
            maxLength: 512,
          },
        },
        required: ['short_name'],
      },
    },

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/NehoraiHadad/telegraph-mcp'

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