Skip to main content
Glama

Scaffold Compose Screen

scaffold_compose_screen

Generate a Jetpack Compose screen file with a composable function and preview, optionally including a matching ViewModel, to create Android UI code.

Instructions

Generate a new Jetpack Compose screen file with a composable function and preview

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectDir": "<projectDir>",
      "screenName": "<screenName>",
      "packageName": "<packageName>"
    },
    "name": "scaffold_compose_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
moduleNoModule nameapp
projectDirYesAbsolute path to the Android project root
screenNameYesScreen name, e.g. 'Profile' (will create ProfileScreen.kt)
packageNameYesPackage name
includeViewModelNoAlso generate a ViewModel file for this screen

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already mark this as a non-read-only, non-destructive, non-idempotent write, and the description's 'Generate a new ... file' is consistent with that. It adds useful context that a file plus composable and preview are produced, but omits the highest-risk behavior for a non-idempotent scaffold: what happens if the target file already exists (overwrite vs. fail vs. suffix).

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

Conciseness4/5

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

A single front-loaded sentence with no filler or redundancy. It is efficiently structured, though the brevity is partly the cause of the missing behavioral detail rather than a deliberate trade-off.

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?

For a file-creating tool with five parameters and no output schema, the description covers the core outcome but not collision/overwrite behavior, where files are placed, or what is returned to confirm success. Adequate as a minimum-viable definition, but an agent would need to guess at the failure modes.

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 description coverage is 100%, so all five parameters (including module default 'app' and includeViewModel) are already documented in the schema. The description adds no parameter meaning beyond that — notably it never mentions that ViewModel generation can be requested, leaving that entirely to the schema. Baseline 3 applies.

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?

States a clear verb+resource: 'Generate a new Jetpack Compose screen file' with 'a composable function and preview', which distinguishes it from the scaffold_activity and scaffold_fragment siblings by artifact type. It stops short of explicitly naming those alternatives, but the Compose-screen wording is specific enough to route selection.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer 'use this when you need a new Compose screen', but there is no explicit when-to-use or when-not guidance, no mention of how it relates to scaffold_activity/scaffold_fragment, and no stated prerequisites (e.g., an existing Gradle module).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.