Skip to main content
Glama

aps_issues_get_comments

Retrieve all comments for a specific project issue. Provide project ID and issue UUID to get a compact list of comment details including ID, body, author, and date with optional pagination and sorting.

Instructions

Get all comments for a specific issue. Returns a compact list: comment id, body, author, date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID – accepts with or without 'b.' prefix.
issue_idYesIssue UUID.
limitNoMax comments to return. Optional.
offsetNoPagination offset. Optional.
sort_byNoSort field (e.g. 'createdAt' or '-createdAt'). Optional.
regionNoData centre region. Defaults to US.

Implementation Reference

  • The main handler function for the aps_issues_get_comments tool. It validates project_id and issue_id, converts the project ID format, builds optional query parameters (limit, offset, sort_by), calls the APS Issues API to GET comments, and returns the summarized result.
    // ── aps_issues_get_comments ─────────────────────────────────
    if (name === "aps_issues_get_comments") {
      const projectId = args.project_id as string;
      const issueId = args.issue_id as string;
      const e1 = validateIssuesProjectId(projectId);
      if (e1) return fail(e1);
      const e2 = validateIssueId(issueId);
      if (e2) return fail(e2);
    
      const pid = toIssuesProjectId(projectId);
      const region = args.region as string | undefined;
      const t = await token();
    
      const query: Record<string, string> = {};
      if (args.limit != null) query.limit = String(Math.min(Math.max(Number(args.limit) || 100, 1), 100));
      if (args.offset != null) query.offset = String(args.offset);
      if (args.sort_by) query.sortBy = args.sort_by as string;
    
      const raw = await apsDmRequest(
        "GET",
        `construction/issues/v1/projects/${pid}/issues/${issueId}/comments`,
        t,
        { query, headers: issuesHeaders(region) },
      );
      return json(summarizeComments(raw));
    }
  • The input schema definition for the aps_issues_get_comments tool. Defines required parameters (project_id, issue_id) and optional parameters (limit, offset, sort_by, region) with their types and descriptions.
    // 16 ── aps_issues_get_comments
    {
      name: "aps_issues_get_comments",
      description:
        "Get all comments for a specific issue. " +
        "Returns a compact list: comment id, body, author, date.",
      inputSchema: {
        type: "object" as const,
        properties: {
          project_id: {
            type: "string",
            description: "Project ID – accepts with or without 'b.' prefix.",
          },
          issue_id: {
            type: "string",
            description: "Issue UUID.",
          },
          limit: {
            type: "number",
            description: "Max comments to return. Optional.",
          },
          offset: {
            type: "number",
            description: "Pagination offset. Optional.",
          },
          sort_by: {
            type: "string",
            description: "Sort field (e.g. 'createdAt' or '-createdAt'). Optional.",
          },
          region: {
            type: "string",
            enum: ["US", "EMEA", "AUS", "CAN", "DEU", "IND", "JPN", "GBR"],
            description: "Data centre region. Defaults to US.",
          },
        },
        required: ["project_id", "issue_id"],
      },
    },
  • src/index.ts:715-752 (registration)
    The tool is registered as entry #16 in the TOOLS array (lines 141-994). The server registers all tools via ListToolsRequestSchema at line 1588.
    // 16 ── aps_issues_get_comments
    {
      name: "aps_issues_get_comments",
      description:
        "Get all comments for a specific issue. " +
        "Returns a compact list: comment id, body, author, date.",
      inputSchema: {
        type: "object" as const,
        properties: {
          project_id: {
            type: "string",
            description: "Project ID – accepts with or without 'b.' prefix.",
          },
          issue_id: {
            type: "string",
            description: "Issue UUID.",
          },
          limit: {
            type: "number",
            description: "Max comments to return. Optional.",
          },
          offset: {
            type: "number",
            description: "Pagination offset. Optional.",
          },
          sort_by: {
            type: "string",
            description: "Sort field (e.g. 'createdAt' or '-createdAt'). Optional.",
          },
          region: {
            type: "string",
            enum: ["US", "EMEA", "AUS", "CAN", "DEU", "IND", "JPN", "GBR"],
            description: "Data centre region. Defaults to US.",
          },
        },
        required: ["project_id", "issue_id"],
      },
    },
  • The summarizeComments helper function that processes the raw API response for issue comments. It extracts pagination info and maps each comment to an IssueCommentSummary (id, body, createdBy, createdAt).
    /** Summarise issue comments response. */
    export function summarizeComments(raw: unknown): {
      pagination: { limit: number; offset: number; totalResults: number };
      comments: IssueCommentSummary[];
    } {
      const r = raw as Record<string, unknown> | undefined;
      const pagination = extractPagination(r);
      const results = Array.isArray(r?.results)
        ? (r!.results as Record<string, unknown>[])
        : [];
    
      const comments: IssueCommentSummary[] = results.map((c) => ({
        id: c.id as string,
        body: (c.body as string) ?? "",
        createdBy: (c.createdBy as string) ?? "",
        createdAt: (c.createdAt as string) ?? "",
      }));
    
      return { pagination, comments };
    }
  • The IssueCommentSummary type definition used by the summarizeComments helper.
    export interface IssueCommentSummary {
      id: string;
      body: string;
      createdBy: string;
      createdAt: string;
    }
Behavior3/5

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

With no annotations, the description carries full burden. It describes the return format but does not disclose whether the operation is read-only, any authentication needs, rate limits, or potential side effects. However, the nature of 'get' implies a safe read operation.

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 two sentences long, with the first sentence stating the purpose and the second detailing the return format. Every word is informative, with no filler or redundancy.

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 tool has 6 parameters (2 required), no output schema, and no annotations, the description provides enough context for a simple read operation. It explains the return fields and the core action. However, it omits mention of pagination or sorting behavior, which is covered in the schema but could be summarized for completeness.

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 coverage is 100%, so the description does not need to repeat parameter details. The description adds value by summarizing the compact return list but does not enhance understanding of the parameters themselves.

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 explicitly states 'Get all comments for a specific issue' with a clear verb and resource, and distinguishes itself from sibling tools like aps_issues_create_comment (which creates) and aps_issues_get (which gets issue details). The mention of a 'compact list' further clarifies the tool's scope.

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?

The description implies use when needing comments for an issue but provides no explicit guidance on when to use this tool versus alternatives (e.g., aps_issues_get for issue details, aps_issues_list for listing issues). No exclusions or prerequisites are mentioned.

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/EverseDevelopment/APS.MCP'

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