Skip to main content
Glama
CircleCI-Public

mcp-server-circleci

Official

list_followed_projects

Retrieve followed CircleCI projects to identify available options and obtain projectSlugs required for subsequent operations.

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 fetches followed projects using CircleCI client, formats them with sluginfo, and returns formatted text list.
    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 (empty object as it takes no parameters).
    export const listFollowedProjectsInputSchema = z.object({});
  • Tool registration object defining name, description, and 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,
    };
  • Addition of listFollowedProjectsTool to the main CCI_TOOLS array.
    export const CCI_TOOLS = [
      getBuildFailureLogsTool,
      getFlakyTestLogsTool,
      getLatestPipelineStatusTool,
      getJobTestResultsTool,
      configHelperTool,
      createPromptTemplateTool,
      recommendPromptTemplateTestsTool,
      runPipelineTool,
      listFollowedProjectsTool,
      runEvaluationTestsTool,
      rerunWorkflowTool,
      downloadUsageApiDataTool,
      findUnderusedResourceClassesTool,
      analyzeDiffTool,
      runRollbackPipelineTool,
      listComponentVersionsTool,
    ];
  • Mapping of 'list_followed_projects' to its handler in the main 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,
      download_usage_api_data: downloadUsageApiData,
      find_underused_resource_classes: findUnderusedResourceClasses,
      analyze_diff: analyzeDiff,
      run_rollback_pipeline: runRollbackPipeline,
      list_component_versions: listComponentVersions,
    } 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 key behaviors: it's a read-only listing operation (implied by 'lists'), discloses pagination limits ('If pagination limits are reached, the tool will indicate that not all projects could be displayed'), and specifies the return format ('Each entry includes the project name and its projectSlug'). However, it doesn't mention authentication requirements or rate limits, which would be helpful for a complete behavioral picture.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately front-loaded with the core purpose, but contains some redundancy (e.g., 'Returns' section repeats what's in the initial description, and the workflow section could be more concise). The 'IMPORTANT' warning about not automatically running tools is valuable but lengthy. Overall, it's comprehensive but could be more tightly structured.

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

Completeness5/5

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

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description provides complete contextual information. It explains what the tool does, when to use it, what it returns, workflow guidance, and important behavioral constraints. For a listing tool with no complex inputs or outputs, this description covers all necessary context.

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 (empty object), so there are no parameters to document. The description appropriately doesn't discuss parameters, focusing instead on the tool's purpose and usage. With no parameters to cover, this exceeds the baseline expectation for parameter documentation.

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 specific action ('lists all projects that the user is following') and resource ('on CircleCI'), distinguishing it from siblings like 'run_pipeline' or 'get_latest_pipeline_status' which perform different operations. It goes beyond just restating the name by specifying the scope (user's followed projects).

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 guidance on when to use this tool ('Identify which CircleCI projects are available to the user', 'Select a project for subsequent operations', 'Obtain the projectSlug needed for other CircleCI tools') and includes a detailed workflow section. It also explicitly states when NOT to use it automatically ('Do not automatically run any additional tools after this tool is called'), addressing alternatives by requiring explicit user instruction for subsequent actions.

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/CircleCI-Public/mcp-server-circleci'

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