Skip to main content
Glama

localnest_list_projects

List top-level project directories from a specified root path to organize and access local codebases efficiently.

Instructions

List first-level project directories under a root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
root_pathNo
max_entriesNo
limitNo
offsetNo
response_formatNojson

Implementation Reference

  • Registration and handler implementation for the 'localnest_list_projects' MCP tool. It delegates to workspace.listProjects and handles pagination.
    registerJsonTool(
      'localnest_list_projects',
      {
        title: 'List Projects',
        description: 'List first-level project directories under a root.',
        inputSchema: {
          root_path: z.string().optional(),
          max_entries: z.number().int().min(1).max(1000).optional(),
          limit: z.number().int().min(1).max(1000).default(100),
          offset: z.number().int().min(0).default(0)
        },
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: false
        }
      },
      async ({ root_path, max_entries, limit, offset }) => {
        const effectiveLimit = max_entries || limit;
        const projects = workspace.listProjects(root_path, 2000);
        const paged = paginateItems(projects, effectiveLimit, offset);
        return {
          ...paged,
          truncated_total: projects.length === 2000
        };
      }
    );

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/wmt-mobile/localnest'

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