Skip to main content
Glama
bitfiction
by bitfiction

create_template

Create a reusable template by scanning a source repository (GitHub/GitLab) to auto-detect platform, environment variables, and build configuration for hosting or migration.

Instructions

Create a new template by scanning a source repository (GitHub or GitLab). Auto-detects platforms, env vars, and builders. Both public and private repositories are supported through the organization's connected Staticbot source-control integration. Before asking the user for a URL, call list_source_repositories and use an unambiguous repository match from the current client/project context, passing that repository's integrationInstanceId as sourceControlIntegrationInstanceId — with several accounts connected, only that one's token can read the repo, and omitting it makes a private repository look missing. If no source-control integration is connected, direct the user to https://app.staticbot.dev/integrations and retry after they connect it. Never claim the repository must be public. Staticbot also classifies the repository's hosting workload; inspect the returned hostingWorkload and isSsr fields instead of choosing AWS or Cloudflare from agent-side heuristics. A template is the shared starting point for BOTH Staticbot paths — hosting the repository and migrating the app off its builder — so creating one does not commit the user to a migration. Use it when no existing template from list_templates matches the repo. The name is optional — if omitted, it's derived from the repo name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoTemplate name (derived from repo name if omitted)
repoLinkYesRepository URL (public or private; e.g. https://github.com/owner/repo or https://gitlab.com/group/project). Resolve it with list_source_repositories when a source-control integration is connected.
sourceControlIntegrationInstanceIdNoThe repository's integrationInstanceId from list_source_repositories — the account it is hosted in. Pass it whenever the repo came from discovery: with several accounts connected on one provider, only that account's token can read it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesParsed JSON response from the Staticbot public API

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.1

TDQS

A5/5.0
Behavior5/5

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

Annotations only set readOnlyHint=false, openWorldHint=false, destructiveHint=false, which convey little beyond 'not read-only'. The description carries the full burden and does so thoroughly: it clarifies that creating a template does not commit the user to a migration, that both public and private repos are supported, that omitting sourceControlIntegrationInstanceId can make a private repo look missing, and that the tool classifies hosting workload rather than relying on agent heuristics. No contradiction with annotations.

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 long but every sentence earns its place. It front-loads the core purpose and then progressively covers integration prerequisites, common mistakes, and strategic context. There is no fluff or repetition; the length is justified by the tool's complexity.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (private/public repo handling, multi-account tokens, classification behavior, dual purpose for hosting and migration) and that an output schema exists, the description is fully complete. It covers all critical preconditions, error handling (no integration connected), and non-obvious behavioral aspects, leaving no ambiguity for an agent.

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

Parameters5/5

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

Although the schema already describes all three parameters (100% coverage), the description adds significant meaning: it explains how repoLink should be resolved, why sourceControlIntegrationInstanceId is critical for multi-account setups, and that name is optional and derived from the repo name. This goes well beyond the schema's basic descriptions and materially improves an agent's ability to use the parameters correctly.

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 tool creates a new template by scanning a source repository, and distinguishes it from list_templates by specifying when to use it ('Use it when no existing template from list_templates matches the repo'). The verb, resource, and scope are specific and unique among siblings.

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

Usage Guidelines5/5

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

Explicitly instructs when to use this tool (no matching template exists), when not to (when a template matches), and names the alternative tool (list_templates). It also provides detailed pre-call steps: resolve the repository via list_source_repositories, pass the integrationInstanceId, and handle the case of no connected integration. This is exemplary usage guidance.

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