Skip to main content
Glama

get_company_posts

Retrieve recent posts from a company's LinkedIn feed to monitor updates, analyze content, and track industry trends.

Instructions

Get recent posts from a company's LinkedIn feed.

Args: company_name: LinkedIn company name (e.g., 'google', 'stripe', 'openai')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
company_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the get_company_posts tool logic. It calls the ScrapeCompanyUseCase with sections='posts' and returns a dictionary containing the URL and serialized sections.
    async def get_company_posts(
        company_name: str,
        ctx: Context,
    ) -> dict[str, Any]:
        try:
            result = await scrape_company_uc.execute(company_name, sections="posts")
            return {
                "url": result.url,
                "sections": serialize_sections(result.sections),
            }
        except Exception as e:
            map_domain_error(e, "get_company_posts")
  • MCP tool registration decorator that registers the get_company_posts tool with its name and description.
    @mcp.tool(
        name="get_company_posts",
        description=(
            "Get recent posts from a company's LinkedIn feed.\n\n"
            "Args:\n"
            "    company_name: LinkedIn company name (e.g., 'google', 'stripe', 'openai')"
        ),
    )
  • Schema definition for a single company post entry, defining fields for text, time_posted, reactions, comments, and reposts.
    @dataclass
    class CompanyPostEntry:
        """A single post from a company's feed."""
    
        text: str | None = None
        time_posted: str | None = None
        reactions: str | None = None
        comments: str | None = None
        reposts: str | None = None
    
    
    @dataclass
    class CompanyPostsSection:
        """Company posts feed — extracted from /company/{name}/posts/."""
    
        posts: list[CompanyPostEntry] = field(default_factory=list)
        raw: str | None = None
  • Schema definition for the company posts section, containing a list of CompanyPostEntry objects and optional raw HTML.
    @dataclass
    class CompanyPostsSection:
        """Company posts feed — extracted from /company/{name}/posts/."""
    
        posts: list[CompanyPostEntry] = field(default_factory=list)
        raw: str | None = None
  • Helper function that serializes all sections in a response, converting typed models to JSON-serializable dicts and stripping None values.
    def serialize_sections(sections: dict[str, Any]) -> dict[str, Any]:
        """Serialize all sections in a response, stripping None values from each."""
        return {name: serialize_section(section) for name, section in sections.items()}
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but lacks details on behavioral traits such as rate limits, authentication requirements, pagination, data freshness, or error handling. For a tool that likely accesses external APIs (LinkedIn), this is a significant gap in transparency.

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?

The description is appropriately sized and front-loaded, with the core purpose stated concisely in the first sentence. The 'Args' section adds necessary parameter details without redundancy. However, the structure could be slightly improved by integrating the parameter explanation more seamlessly, but overall it's efficient with minimal waste.

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?

Given the tool's moderate complexity (accessing LinkedIn data), no annotations, and an output schema present (which handles return values), the description is minimally adequate. It covers the purpose and parameter semantics but lacks usage guidelines and behavioral transparency, leaving gaps in context that could hinder effective tool selection and invocation by an AI agent.

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?

The description adds meaningful context for the single parameter 'company_name' by specifying it as a 'LinkedIn company name' and providing examples ('google', 'stripe', 'openai'). Since schema description coverage is 0% and there's only one parameter, this effectively compensates for the schema's lack of details, making the parameter semantics clear and actionable.

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 verb 'Get' and resource 'recent posts from a company's LinkedIn feed', making the purpose specific and understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_company_profile' or 'search_people', which might also retrieve LinkedIn data but for different resources.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios where this tool is preferred over siblings like 'get_company_profile' (which might get company info instead of posts) or 'search_people' (which might find individuals). There's no context on prerequisites, limitations, or exclusions for usage.

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/eliasbiondo/linkedin-mcp-server'

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