Skip to main content
Glama
jginorio

Sprout Social MCP Server

by jginorio

get_publishing_post

Retrieve details of a specific publishing post using its unique ID to access post content, status, and metadata.

Instructions

Retrieve details of a specific publishing post by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publishing_post_idYesThe unique ID of the publishing post to retrieve.

Implementation Reference

  • src/index.ts:459-474 (registration)
    Registration and handler for the 'get_publishing_post' tool. Registered via server.tool() with a Zod schema expecting a 'publishing_post_id' string. The handler makes a GET request to /publishing/posts/{id} using the sproutRequest helper and returns the JSON response.
    server.tool(
      "get_publishing_post",
      "Retrieve details of a specific publishing post by its ID.",
      {
        publishing_post_id: z
          .string()
          .describe("The unique ID of the publishing post to retrieve."),
      },
      async ({ publishing_post_id }) => {
        const data = await sproutRequest(
          "GET",
          `/publishing/posts/${publishing_post_id}`
        );
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
  • Input schema for the tool using Zod. Defines a required 'publishing_post_id' string parameter describing the unique ID of the publishing post to retrieve.
    {
      publishing_post_id: z
        .string()
        .describe("The unique ID of the publishing post to retrieve."),
    },
  • The sproutRequest helper function used by the tool handler to make authenticated API calls to Sprout Social. Constructs the full URL, adds Bearer auth, and handles error responses.
    async function sproutRequest(
      method: "GET" | "POST",
      path: string,
      body?: Record<string, unknown>
    ): Promise<unknown> {
      const { apiKey, customerId } = getConfig();
      const url = `${SPROUT_API_BASE}/v1/${customerId}${path}`;
    
      const headers: Record<string, string> = {
        Authorization: `Bearer ${apiKey}`,
        Accept: "application/json",
      };
    
      const options: RequestInit = { method, headers };
    
      if (body) {
        headers["Content-Type"] = "application/json";
        options.body = JSON.stringify(body);
      }
    
      const response = await fetch(url, options);
    
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(
          `Sprout Social API error (${response.status}): ${errorText}`
        );
      }
    
      return response.json();
    }
Behavior2/5

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

The word 'retrieve' implies a safe, read-only operation, but no annotations are provided, and the description does not disclose any behavioral traits such as authentication requirements, rate limits, or response format. For a read tool, this is minimally sufficient but below average.

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

Conciseness5/5

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

The description is a single, clear sentence that contains no extraneous information. It is appropriately sized and front-loaded.

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

Completeness4/5

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

Given the simplicity of the tool (one parameter, no output schema, no nested objects), the description is complete enough. It identifies the resource and the key identifier. No further details are necessary for a straightforward retrieval.

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

Parameters3/5

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

The schema covers 100% of the parameters with a description for 'publishing_post_id'. The tool description adds no additional meaning beyond what the schema already provides, so it meets the baseline but adds no extra value.

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

Purpose4/5

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

The description clearly states the action ('retrieve') and the resource ('a specific publishing post by its ID'), distinguishing it from 'create_publishing_post'. However, it does not elaborate on what 'details' include, leaving some ambiguity.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like 'get_cases' or 'get_client'. The description is purely functional without context or exclusion criteria.

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/jginorio/sprout-social-mcp'

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