telegraph_edit_account_info
Update Telegraph account details like name, author information, or profile link using an access token to manage your publishing identity.
Instructions
Update information about a Telegraph account. At least one optional parameter must be provided.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| access_token | Yes | Access token of the Telegraph account | |
| short_name | No | New account name (1-32 characters) | |
| author_name | No | New default author name (0-128 characters) | |
| author_url | No | New default profile link (0-512 characters) |
Implementation Reference
- src/tools/account.ts:149-163 (handler)Handler function for the 'telegraph_edit_account_info' tool. Validates input using EditAccountInfoSchema and calls the Telegraph API to edit account info, returning the result as JSON.case 'telegraph_edit_account_info': { const input = EditAccountInfoSchema.parse(args); const result = await telegraph.editAccountInfo( input.access_token, input.short_name, input.author_name, input.author_url ); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; }
- src/tools/account.ts:17-22 (schema)Zod schema defining the input parameters for the 'telegraph_edit_account_info' tool, used for validation in the handler.export const EditAccountInfoSchema = z.object({ access_token: z.string().describe('Access token of the Telegraph account'), short_name: z.string().min(1).max(32).optional().describe('New account name (1-32 characters)'), author_name: z.string().max(128).optional().describe('New default author name (0-128 characters)'), author_url: z.string().max(512).optional().describe('New default profile link (0-512 characters)'), });
- src/tools/account.ts:63-92 (registration)Registration of the 'telegraph_edit_account_info' tool in the accountTools array, including name, description, and JSON input schema.{ name: 'telegraph_edit_account_info', description: 'Update information about a Telegraph account. At least one optional parameter must be provided.', inputSchema: { type: 'object' as const, properties: { access_token: { type: 'string', description: 'Access token of the Telegraph account', }, short_name: { type: 'string', description: 'New account name (1-32 characters)', minLength: 1, maxLength: 32, }, author_name: { type: 'string', description: 'New default author name (0-128 characters)', maxLength: 128, }, author_url: { type: 'string', description: 'New default profile link (0-512 characters)', maxLength: 512, }, }, required: ['access_token'], }, },