Skip to main content
Glama
doko89
by doko89

list_projects

Retrieve all projects from your local MyContext directory to manage project documentation organized in markdown files.

Instructions

List all available projects in the context directory (~/.mycontext/)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that lists all top-level project directories by ensuring the context directory exists and reading its subdirectories.
    async function listProjects(): Promise<string[]> {
      await ensureContextDir();
      const entries = await fs.readdir(CONTEXT_DIR, { withFileTypes: true });
      return entries.filter((e) => e.isDirectory()).map((e) => e.name);
    }
  • src/index.ts:159-167 (registration)
    Registration of the 'list_projects' tool in the ListToolsRequestSchema handler, including name, description, and empty input schema (no parameters required).
    {
      name: "list_projects",
      description:
        "List all available projects in the context directory (~/.mycontext/)",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Execution handler within the CallToolRequestSchema switch that invokes listProjects and returns the formatted response.
    case "list_projects": {
      const projects = await listProjects();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                projects,
                context_directory: CONTEXT_DIR,
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • Helper function used by listProjects to ensure the context directory exists before listing projects.
    async function ensureContextDir() {
      try {
        await fs.access(CONTEXT_DIR);
      } catch {
        await fs.mkdir(CONTEXT_DIR, { recursive: true });
      }
    }
  • Input schema definition for the list_projects tool (empty object, no required parameters).
    inputSchema: {
      type: "object",
      properties: {},
    },
Behavior2/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 mentions the directory location but doesn't cover critical aspects like whether this is a read-only operation (implied by 'List'), error handling, permissions required, or output format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence that front-loads the key action ('List all available projects') and adds necessary context ('in the context directory (~/.mycontext/)'). There is zero waste, and every word earns its place, making it highly concise and well-structured.

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

Completeness3/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 output schema, no annotations), the description is adequate but has clear gaps. It covers the basic purpose and location but lacks details on behavioral traits, usage guidelines, and output format. For a list tool with no structured support, it meets minimum viability but could be more complete.

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 tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description adds value by specifying the directory context, which isn't in the schema. Baseline for 0 parameters is 4, as it appropriately addresses the lack of inputs without redundancy.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all available projects'), specifying the location ('in the context directory (~/.mycontext/)'). It distinguishes from siblings like 'get_project_structure' (which likely shows internal structure) and 'search_context' (which filters), though not explicitly. The purpose is specific but could better differentiate from 'read_context'.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'search_context' for filtered results or 'read_context' for reading specific content. The description implies usage for listing all projects without filtering, but it doesn't state exclusions or prerequisites, leaving the agent to infer context.

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/doko89/mcp-mycontext'

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