Skip to main content
Glama
soil-dev

capsulemcp

list_associated_projects

Retrieve projects linked to a specific opportunity. Use to discover opportunity-to-project relationships.

Instructions

List projects (cases) associated with a given opportunity. Returns the same record shape as list_projects, filtered to one opportunity. The inverse direction (project → opportunity) is on each project's opportunity field directly, so this tool is only needed for opportunity → projects discovery — use list_party_projects for party → projects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opportunityIdYes
embedNoComma-separated embeds, e.g. 'tags,fields'
pageNo
perPageNo

Implementation Reference

  • The main handler function for list_associated_projects. Makes a GET request to /opportunities/{id}/kases (Capsule's API uses /kases for projects) and returns the data with pagination info.
    export async function listAssociatedProjects(input: z.infer<typeof listAssociatedProjectsSchema>) {
      // Capsule's API uses /kases for projects.
      const { data, nextPage } = await capsuleGet<{ kases: unknown[] }>(
        `/opportunities/${input.opportunityId}/kases`,
        { embed: input.embed, page: input.page, perPage: input.perPage },
      );
      return { ...data, nextPage };
    }
  • Zod schema for list_associated_projects input: opportunityId (required positive int), embed (optional string for tags/fields), page (default 1), perPage (default 25, max 100).
    export const listAssociatedProjectsSchema = z.object({
      opportunityId: z.number().int().positive(),
      embed: z.string().optional().describe(EMBED_TAGS_FIELDS_DESCRIPTION),
      page: z.number().int().positive().optional().default(1),
      perPage: z.number().int().min(1).max(100).optional().default(25),
    });
  • src/server.ts:450-456 (registration)
    Registration of the 'list_associated_projects' tool with the MCP server, linking the schema and handler.
    registerTool(
      server,
      "list_associated_projects",
      "List projects (cases) associated with a given opportunity. Returns the same record shape as list_projects, filtered to one opportunity. The inverse direction (project → opportunity) is on each project's `opportunity` field directly, so this tool is only needed for opportunity → projects discovery — use list_party_projects for party → projects.",
      listAssociatedProjectsSchema,
      listAssociatedProjects,
    );
  • src/server.ts:156-165 (registration)
    Import of listAssociatedProjectsSchema and listAssociatedProjects from the relationships module.
    import {
      listAdditionalPartiesSchema,
      listAdditionalParties,
      addAdditionalPartySchema,
      addAdditionalParty,
      removeAdditionalPartySchema,
      removeAdditionalParty,
      listAssociatedProjectsSchema,
      listAssociatedProjects,
    } from "./tools/relationships.js";
Behavior3/5

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

With no annotations, the description provides basic behavioral context (returns filtered list of projects matching list_projects shape) but does not disclose error handling, pagination behavior, or data binding constraints beyond the schema.

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 extremely concise (two sentences), front-loaded with the core purpose, and every part adds value without redundancy.

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?

Given no output schema and 4 parameters, the description omits return format details (beyond referencing list_projects), pagination semantics, and error scenarios, making it incomplete for a tool of this complexity.

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

Parameters2/5

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

Schema coverage is only 25% (only embed has a description). The description does not explain the required opportunityId or pagination parameters, failing to compensate for the low coverage.

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 it lists projects associated with a given opportunity, specifies the return shape matches list_projects, and distinguishes itself from list_party_projects, making the purpose unambiguous.

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

Usage Guidelines4/5

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

The description explicitly contrasts this tool with list_party_projects and notes the inverse relationship on the project object, guiding when to use this tool vs alternatives. However, it lacks explicit prerequisites or conditions for 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/soil-dev/capsulemcp'

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