Skip to main content
Glama

list_screens

List all generated iOS mockup screens. Use the project filter to find screens for a specific project.

Instructions

List all generated screens, optionally filtered by project name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoFilter by project. Omit to list all.

Implementation Reference

  • Zod schema (listInput) for the list_screens tool input. Accepts an optional 'project' string parameter to filter screens by project.
    const listInput = z.object({
      project: z.string().optional().describe("Filter by project. Omit to list all."),
    });
  • src/server.ts:61-65 (registration)
    Tool definition registration of 'list_screens' in the TOOLS array. Defines name, description, and inputSchema for the MCP tool.
    {
      name: "list_screens",
      description: "List all generated screens, optionally filtered by project name.",
      inputSchema: zodToJson(listInput),
    },
  • src/server.ts:128-129 (registration)
    Routes the 'list_screens' tool call to handleList() in the CallToolRequestSchema handler.
    case "list_screens":
      return await handleList(listInput.parse(args));
  • handleList() — the handler function for the list_screens tool. Calls listScreens() with optional project filter, formats results into a text list showing ID, project, name, date, and parent reference.
    async function handleList(input: z.infer<typeof listInput>) {
      const screens = await listScreens(input.project);
      if (screens.length === 0) {
        return {
          content: [{ type: "text" as const, text: "No screens found." }],
        };
      }
      const lines = screens.map(
        (s) =>
          `- [${s.id}] ${s.project} / ${s.name}  (${s.createdAt})${s.parentId ? `  ← ${s.parentId.slice(0, 8)}` : ""}`
      );
      return {
        content: [{ type: "text" as const, text: lines.join("\n") }],
      };
    }
  • listScreens() — the storage helper that reads all .json metadata files from project directories. Filters by project if specified, returns screens sorted by creation date descending.
    export async function listScreens(project?: string): Promise<SavedScreen[]> {
      const projects = project ? [slug(project)] : await listProjects();
      const result: SavedScreen[] = [];
      for (const p of projects) {
        const dir = join(DESIGNS_DIR, p);
        const files = await readdir(dir).catch(() => []);
        for (const f of files) {
          if (f.endsWith(".json")) {
            const meta = JSON.parse(await readFile(join(dir, f), "utf8")) as SavedScreen;
            result.push(meta);
          }
        }
      }
      return result.sort((a, b) => b.createdAt.localeCompare(a.createdAt));
    }
Behavior4/5

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

The description implies a read-only operation without side effects, which is transparent for a list tool. No annotations exist, but the description is clear.

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, concise sentence that efficiently conveys the tool's purpose and optional parameter without extraneous information.

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?

For a simple list tool with one optional parameter and no output schema, the description is adequate. It could be more complete by mentioning the return format, but it still provides sufficient context for an AI agent.

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?

Schema coverage is 100% with a clear description of the 'project' parameter. The tool description adds 'optionally filtered by project name' but does not add significant new meaning beyond the schema.

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 action ('list') and resource ('generated screens') with an optional filter. It distinguishes from siblings like generate_screen and get_screen.

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

Usage Guidelines4/5

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

The description implies when to use (listing all screens) and mentions optional filtering, but does not explicitly state when not to use or compare to alternatives like iterate_screen.

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/karyaboyraz/mockit-mcp'

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