Skip to main content
Glama

telegraph_get_account_info

Retrieve Telegraph account details including author name, URL, and page count using an access token. Specify which account fields to return for customized information.

Instructions

Get information about a Telegraph account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
access_tokenYesAccess token of the Telegraph account
fieldsNoList of account fields to return (default: short_name, author_name, author_url)

Implementation Reference

  • The handler logic for the 'telegraph_get_account_info' tool. It validates the input using GetAccountInfoSchema, calls the telegraph.getAccountInfo function, and returns the result as JSON text.
    case 'telegraph_get_account_info': {
      const input = GetAccountInfoSchema.parse(args);
      const result = await telegraph.getAccountInfo(
        input.access_token,
        input.fields as AccountField[] | undefined
      );
      return {
        content: [{
          type: 'text' as const,
          text: JSON.stringify(result, null, 2),
        }],
      };
    }
  • Zod schema for input validation of the telegraph_get_account_info tool, defining access_token and optional fields.
    export const GetAccountInfoSchema = z.object({
      access_token: z.string().describe('Access token of the Telegraph account'),
      fields: z.array(z.enum(['short_name', 'author_name', 'author_url', 'auth_url', 'page_count']))
        .optional()
        .describe('List of account fields to return'),
    });
  • Registration of the 'telegraph_get_account_info' tool in the accountTools array, including name, description, and input schema definition.
    {
      name: 'telegraph_get_account_info',
      description: 'Get information about a Telegraph account.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          access_token: {
            type: 'string',
            description: 'Access token of the Telegraph account',
          },
          fields: {
            type: 'array',
            items: {
              type: 'string',
              enum: ['short_name', 'author_name', 'author_url', 'auth_url', 'page_count'],
            },
            description: 'List of account fields to return (default: short_name, author_name, author_url)',
          },
        },
        required: ['access_token'],
      },
    },

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