Skip to main content
Glama
bbernstein

LacyLights MCP Server

by bbernstein

list_projects

Retrieve all available lighting projects with optional fixture and scene counts for efficient project management in the LacyLights system.

Instructions

List all available lighting projects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeDetailsNoInclude fixture and scene counts

Implementation Reference

  • The async listProjects method in ProjectTools class that implements the core logic for listing projects: parses input args, conditionally queries GraphQL for projects with/without counts based on includeDetails, maps results to response format, handles errors.
    async listProjects(args: z.infer<typeof ListProjectsSchema>) {
      const { includeDetails } = ListProjectsSchema.parse(args);
    
      try {
        if (includeDetails) {
          // Use efficient count query
          const projects = await this.graphqlClient.getProjectsWithCounts();
          return {
            projects: projects.map(project => ({
              id: project.id,
              name: project.name,
              description: project.description,
              createdAt: project.createdAt,
              updatedAt: project.updatedAt,
              fixtureCount: project.fixtureCount,
              sceneCount: project.sceneCount,
              cueListCount: project.cueListCount
            })),
            totalProjects: projects.length
          };
        }
    
        // Lightweight query without counts
        const projects = await this.graphqlClient.getProjects();
        return {
          projects: projects.map(project => ({
            id: project.id,
            name: project.name,
            description: project.description
          })),
          totalProjects: projects.length
        };
      } catch (error) {
        throw new Error(`Failed to list projects: ${error}`);
      }
    }
  • Zod schema defining the input parameters for the listProjects tool: optional boolean includeDetails.
    const ListProjectsSchema = z.object({
      includeDetails: z.boolean().default(false).describe('Include fixture and scene counts')
    });
  • src/index.ts:1790-1802 (registration)
    Registration in CallToolRequestSchema handler: switch case for "list_projects" that calls projectTools.listProjects and formats response.
    case "list_projects":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await this.projectTools.listProjects(args as any),
              null,
              2,
            ),
          },
        ],
      };
  • src/index.ts:72-95 (registration)
    Tool definition in ListToolsRequestSchema handler: specifies name, description, and inputSchema for "list_projects".
              {
                name: "list_projects",
                description: `List all projects with optional detail level.
    
    Parameters:
    - includeDetails: When true, includes resource counts for each project. Default false.
    
    Returns:
    - Basic info (id, name, description) always
    - Resource counts (fixtureCount, sceneCount, cueListCount) when includeDetails=true
    
    Use includeDetails=false for quick project listing.
    Use includeDetails=true when you need to understand project sizes.`,
                inputSchema: {
                  type: "object",
                  properties: {
                    includeDetails: {
                      type: "boolean",
                      default: false,
                      description: "Include fixture/scene/cue counts",
                    },
                  },
                },
              },
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'List all available lighting projects' but doesn't mention whether this is a read-only operation, if it requires authentication, what the return format looks like, or any pagination/rate limits. For a list operation with zero annotation coverage, this leaves critical behavioral traits unspecified.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 the lack of annotations and output schema, the description is incomplete for a list operation. It doesn't explain what 'list' returns (e.g., project names, IDs, metadata), how results are structured, or any constraints like permissions or limits. This leaves the agent with insufficient context to use the tool effectively.

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

Parameters3/5

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

The input schema has 100% description coverage, with the single parameter 'includeDetails' documented as 'Include fixture and scene counts'. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.

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 action ('List') and target resource ('all available lighting projects'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'get_project_details' or 'get_fixture_inventory' that might also retrieve project-related information, preventing a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_project_details' (likely for specific projects) and 'create_project' (for creation), the agent must infer usage context without explicit direction, which is a significant gap.

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

Related 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/bbernstein/lacylights-mcp'

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