Skip to main content
Glama

esa_list_posts

Retrieve and manage team posts with pagination, search queries, and customizable sorting options to organize documentation efficiently.

Instructions

Get a list of posts in the team (with pagination support)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoSearch query (see esa API documentation for details)
includeNoRelated data to include in the response (e.g. 'comments,stargazers')
sortNoSort method (updated, created, number, stars, watches, comments, best_match)updated
orderNoSort order (desc, asc)desc
per_pageNoNumber of results per page (default: 20, max: 100)
pageNoPage number to retrieve

Implementation Reference

  • Executes the esa_list_posts tool by parsing arguments and calling the EsaClient.listPosts method to fetch posts from the ESA API.
    case "esa_list_posts": {
      const args = request.params.arguments as unknown as ListPostsArgs;
      const response = await esaClient.listPosts(args);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Defines the Tool object for esa_list_posts, including name, description, and detailed inputSchema with properties for search, pagination, sorting, etc.
    const listPostsTool: Tool = {
      name: "esa_list_posts",
      description: "Get a list of posts in the team (with pagination support)",
      inputSchema: {
        type: "object",
        properties: {
          q: {
            type: "string",
            description: "Search query (see esa API documentation for details)",
          },
          include: {
            type: "string",
            description: "Related data to include in the response (e.g. 'comments,stargazers')",
          },
          sort: {
            type: "string",
            description: "Sort method (updated, created, number, stars, watches, comments, best_match)",
            default: "updated",
          },
          order: {
            type: "string",
            description: "Sort order (desc, asc)",
            default: "desc",
          },
          per_page: {
            type: "number",
            description: "Number of results per page (default: 20, max: 100)",
            default: 20,
          },
          page: {
            type: "number",
            description: "Page number to retrieve",
            default: 1,
          },
        },
      },
    };
  • index.ts:607-619 (registration)
    Registers the esa_list_posts tool (via listPostsTool) in the ListToolsRequest handler's tools array.
        tools: [
          listPostsTool,
          getPostTool,
          createPostTool,
          updatePostTool,
          listCommentsTool,
          getCommentTool,
          createCommentTool,
          getMembersTool,
          getMemberTool,
        ],
      };
    });
  • EsaClient method that constructs the API request to list posts based on provided arguments and fetches data from the ESA API.
    async listPosts(args: ListPostsArgs = {}): Promise<any> {
      const params = new URLSearchParams();
      
      if (args.q) params.append("q", args.q);
      if (args.include) params.append("include", args.include);
      if (args.sort) params.append("sort", args.sort);
      if (args.order) params.append("order", args.order);
      if (args.per_page) params.append("per_page", args.per_page.toString());
      if (args.page) params.append("page", args.page.toString());
    
      const url = `${this.baseUrl}/posts${params.toString() ? `?${params}` : ""}`;
      const response = await fetch(url, { headers: this.headers });
    
      return response.json();
    }
  • TypeScript interface defining the argument types for esa_list_posts tool.
    interface ListPostsArgs {
      q?: string;
      include?: string;
      sort?: string;
      order?: string;
      per_page?: number;
      page?: number;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions pagination support which is valuable, but doesn't describe authentication requirements, rate limits, error conditions, response format, or what happens with empty results. For a list operation with 6 parameters, this leaves significant behavioral gaps.

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 perfectly concise - a single sentence that front-loads the core functionality ('Get a list of posts in the team') and adds one important behavioral note ('with pagination support'). Every word earns its place with zero redundancy or unnecessary elaboration.

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

Completeness2/5

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

For a tool with 6 parameters, no annotations, and no output schema, the description is insufficient. While concise, it doesn't compensate for the lack of structured metadata. It should address authentication, response format, error handling, or practical usage examples given the complexity implied by multiple filtering and pagination parameters.

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?

Schema description coverage is 100%, providing complete parameter documentation. The description adds no specific parameter information beyond implying list functionality with pagination. This meets the baseline score of 3 since the schema does the heavy lifting, but the description doesn't enhance understanding of how parameters interact or their practical use.

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 ('Get a list') and resource ('posts in the team'), making the purpose immediately understandable. It distinguishes from siblings like esa_get_post (single post retrieval) and esa_list_comments (different resource type), though it doesn't explicitly name these alternatives. The mention of pagination support adds useful scope information.

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 when to choose this over esa_get_post for single posts, or how it relates to esa_list_comments. There's no context about prerequisites, team selection, or filtering strategies beyond what's implied by parameters.

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/kajirita2002/esa-mcp-server'

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