Skip to main content
Glama
ampcome-mcps

CircleCI MCP Server

by ampcome-mcps

list_followed_projects

Retrieve all CircleCI projects you follow to identify available options and obtain projectSlugs required for subsequent operations like checking build status or managing workflows.

Instructions

This tool lists all projects that the user is following on CircleCI.

Common use cases:
- Identify which CircleCI projects are available to the user
- Select a project for subsequent operations
- Obtain the projectSlug needed for other CircleCI tools

Returns:
- A list of projects that the user is following on CircleCI
- Each entry includes the project name and its projectSlug

Workflow:
1. Run this tool to see available projects
2. User selects a project from the list
3. The LLM should extract and use the projectSlug (not the project name) from the selected project for subsequent tool calls
4. The projectSlug is required for many other CircleCI tools, and will be used for those tool calls after a project is selected

Note: If pagination limits are reached, the tool will indicate that not all projects could be displayed.

IMPORTANT: Do not automatically run any additional tools after this tool is called. Wait for explicit user instruction before executing further tool calls. The LLM MUST NOT invoke any other CircleCI tools until receiving a clear instruction from the user about what to do next, even if the user selects a project. It is acceptable to list out tool call options for the user to choose from, but do not execute them until instructed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsNo

Implementation Reference

  • The main handler function that implements the core logic of the 'list_followed_projects' tool. It fetches the list of followed projects from CircleCI using the private client, formats them with indices and projectSlugs, handles empty lists and pagination warnings, and returns a formatted text response instructing the user on next steps.
    export const listFollowedProjects: ToolCallback<{
      params: typeof listFollowedProjectsInputSchema;
    }> = async () => {
      const circleciPrivate = getCircleCIPrivateClient();
      const followedProjects = await circleciPrivate.me.getFollowedProjects();
    
      const { projects, reachedMaxPagesOrTimeout } = followedProjects;
    
      if (projects.length === 0) {
        return mcpErrorOutput(
          'No projects found. Please make sure you have access to projects and have followed them.',
        );
      }
    
      const formattedProjectChoices = projects
        .map(
          (project, index) =>
            `${index + 1}. ${project.name} (projectSlug: ${project.slug})`,
        )
        .join('\n');
    
      let resultText = `Projects followed:\n${formattedProjectChoices}\n\nPlease have the user choose one of these projects by name or number. When they choose, you (the LLM) should extract and use the projectSlug (not the project name) associated with their chosen project for subsequent tool calls. This projectSlug is required for tools like get_build_failure_logs, getFlakyTests, and get_job_test_results.`;
    
      if (reachedMaxPagesOrTimeout) {
        resultText = `WARNING: Not all projects were included due to pagination limits or timeout.\n\n${resultText}`;
      }
    
      return {
        content: [
          {
            type: 'text',
            text: resultText,
          },
        ],
      };
    };
  • Zod input schema for the tool, which is an empty object as the tool requires no input parameters.
    export const listFollowedProjectsInputSchema = z.object({});
  • Tool object registration defining the name 'list_followed_projects', detailed description, and reference to the input schema.
    export const listFollowedProjectsTool = {
      name: 'list_followed_projects' as const,
      description: `
        This tool lists all projects that the user is following on CircleCI.
        
        Common use cases:
        - Identify which CircleCI projects are available to the user
        - Select a project for subsequent operations
        - Obtain the projectSlug needed for other CircleCI tools
        
        Returns:
        - A list of projects that the user is following on CircleCI
        - Each entry includes the project name and its projectSlug
        
        Workflow:
        1. Run this tool to see available projects
        2. User selects a project from the list
        3. The LLM should extract and use the projectSlug (not the project name) from the selected project for subsequent tool calls
        4. The projectSlug is required for many other CircleCI tools, and will be used for those tool calls after a project is selected
        
        Note: If pagination limits are reached, the tool will indicate that not all projects could be displayed.
        
        IMPORTANT: Do not automatically run any additional tools after this tool is called. Wait for explicit user instruction before executing further tool calls. The LLM MUST NOT invoke any other CircleCI tools until receiving a clear instruction from the user about what to do next, even if the user selects a project. It is acceptable to list out tool call options for the user to choose from, but do not execute them until instructed.
        `,
      inputSchema: listFollowedProjectsInputSchema,
    };
  • Inclusion of listFollowedProjectsTool in the main CCI_TOOLS array for global tool registration.
    export const CCI_TOOLS = [
      getBuildFailureLogsTool,
      getFlakyTestLogsTool,
      getLatestPipelineStatusTool,
      getJobTestResultsTool,
      configHelperTool,
      createPromptTemplateTool,
      recommendPromptTemplateTestsTool,
      runPipelineTool,
      listFollowedProjectsTool,
      runEvaluationTestsTool,
      rerunWorkflowTool,
      analyzeDiffTool,
      runRollbackPipelineTool,
    ];
  • Mapping of tool name 'list_followed_projects' to its handler function listFollowedProjects in the CCI_HANDLERS object.
    export const CCI_HANDLERS = {
      get_build_failure_logs: getBuildFailureLogs,
      find_flaky_tests: getFlakyTestLogs,
      get_latest_pipeline_status: getLatestPipelineStatus,
      get_job_test_results: getJobTestResults,
      config_helper: configHelper,
      create_prompt_template: createPromptTemplate,
      recommend_prompt_template_tests: recommendPromptTemplateTests,
      run_pipeline: runPipeline,
      list_followed_projects: listFollowedProjects,
      run_evaluation_tests: runEvaluationTests,
      rerun_workflow: rerunWorkflow,
      analyze_diff: analyzeDiff,
      run_rollback_pipeline: runRollbackPipeline,
    } satisfies ToolHandlers;
Behavior4/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 effectively describes the tool's behavior: it returns a list of projects with name and projectSlug, includes pagination limits ('If pagination limits are reached...'), and specifies workflow constraints (e.g., waiting for user instruction). It does not cover error handling or authentication needs, but provides substantial context beyond basic functionality.

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 well-structured with clear sections (Common use cases, Returns, Workflow, Note, IMPORTANT), making it easy to scan. It is slightly verbose in the 'IMPORTANT' section with repetitive warnings, but overall, each sentence adds value, such as clarifying the tool's role in workflows and preventing misuse.

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's complexity (simple list operation with no input parameters) and lack of annotations/output schema, the description is largely complete. It explains the purpose, usage, output format, pagination behavior, and workflow integration. It could briefly mention error cases or authentication, but it covers the essential context for an AI agent to use the tool correctly.

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 input schema has 0 parameters, so the baseline is 4. The description does not need to explain parameters, and it appropriately focuses on output and usage instead. No additional parameter information is required or provided.

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 the tool's purpose: 'lists all projects that the user is following on CircleCI.' It specifies the verb ('lists'), resource ('projects'), and scope ('following on CircleCI'), distinguishing it from sibling tools that focus on builds, pipelines, tests, or configurations rather than project listings.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: 'Common use cases' include identifying available projects, selecting a project for operations, and obtaining projectSlug for other tools. It also includes a detailed 'Workflow' section with step-by-step instructions and an 'IMPORTANT' note on when not to use it (e.g., not automatically running additional tools without user instruction).

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/ampcome-mcps/circleci-mcp'

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