Skip to main content
Glama
pascalporedda

Typefully MCP Server

get_published_drafts

Retrieve recently published drafts from Typefully to review and manage your published content.

Instructions

Get recently published drafts from Typefully.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for 'get_published_drafts' tool in the CallToolRequestSchema switch statement. Calls client.getPublishedDrafts() and formats the response as a text content block showing draft ID, content (truncated to 100 chars), and created_at.
    case 'get_published_drafts': {
      const drafts = await this.client.getPublishedDrafts();
      
      return {
        content: [
          {
            type: 'text',
            text: `Found ${drafts.length} published drafts:\n\n${drafts
              .map((draft) => `ID: ${draft.id}\nContent: ${draft.content.substring(0, 100)}...\nCreated: ${draft.created_at}\n`)
              .join('\n')}`,
          },
        ],
      };
    }
  • Client method getPublishedDrafts() that calls the Typefully API endpoint GET /drafts/recently-published/, validates the response with GetDraftsResponseSchema, and returns the drafts array.
    async getPublishedDrafts(): Promise<Draft[]> {
      const response = await this.client.get('/drafts/recently-published/');
      const validatedResponse = GetDraftsResponseSchema.parse(response.data);
      return validatedResponse.drafts;
    }
  • GetDraftsResponseSchema used to validate the API response for get_published_drafts. Contains a 'drafts' array of DraftSchema objects.
    export const GetDraftsResponseSchema = z.object({
      drafts: z.array(DraftSchema),
    });
  • src/server.ts:78-85 (registration)
    Tool registration for 'get_published_drafts' in the ListToolsRequestSchema handler. Defines the tool name, description ('Get recently published drafts from Typefully.'), and inputSchema (empty object, no parameters).
    {
      name: 'get_published_drafts',
      description: 'Get recently published drafts from Typefully.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
Behavior2/5

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

No annotations provided; description only states 'recently' without specifying time window, ordering, or pagination. Does not disclose if it's a read-only operation or any rate limits.

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

Conciseness4/5

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

Single sentence, very concise. Could be slightly expanded (e.g., mention no parameters needed) without losing conciseness.

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

Completeness3/5

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

Adequate for a simple parameterless tool, but lacks details on output structure or behavior. With siblings, operation is clear but incomplete for full agent decision-making.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters, so schema coverage is 100%. Description adds no extra parameter info, but baseline for 0 params is 4. However, it could mention output format.

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

Purpose5/5

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

The description clearly states the action ('Get') and the resource ('recently published drafts from Typefully'), distinguishing it from siblings: create_draft (creation) and get_scheduled_drafts (scheduled, not published).

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

Usage Guidelines3/5

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

No explicit when-to-use or alternatives are mentioned, but the context implies use when needing published drafts. Lacks guidance on when not to use.

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

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/pascalporedda/typefully-mcp-server'

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