Skip to main content
Glama

cancel_scheduled_post

Cancel a scheduled social media post before it publishes by providing the post ID. This allows you to stop content from going live on X, Instagram, or Threads.

Instructions

Cancel a scheduled post before it publishes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
postIdYesThe ID of the scheduled post to cancel

Implementation Reference

  • The core handler function that performs the tool logic: makes a DELETE API request to `/schedule/${postId}` using the shared apiRequest method, checks for success, and returns a success message or throws an error.
    private async cancelScheduledPost(args: any) { const result = await this.apiRequest('DELETE', `/schedule/${args.postId}`); if (result.success) { return { content: [ { type: 'text', text: `✅ Scheduled post ${args.postId} has been canceled.`, }, ], }; } else { throw new Error(result.message || 'Failed to cancel scheduled post'); } }
  • Input schema definition for the cancel_scheduled_post tool, specifying the required 'postId' parameter.
    inputSchema: { type: 'object', properties: { postId: { type: 'string', description: 'The ID of the scheduled post to cancel', }, }, required: ['postId'], },
  • src/index.ts:107-120 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    { name: 'cancel_scheduled_post', description: 'Cancel a scheduled post before it publishes', inputSchema: { type: 'object', properties: { postId: { type: 'string', description: 'The ID of the scheduled post to cancel', }, }, required: ['postId'], }, },
  • src/index.ts:148-149 (registration)
    Dispatch/registration in the CallToolRequest handler switch statement that routes to the cancelScheduledPost method.
    case 'cancel_scheduled_post': return await this.cancelScheduledPost(args);

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/fav-devs/sociona-mcp-server'

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