Skip to main content
Glama

findagent_create_code_draft

Persist a CODE-BUNDLE draft from YOUR OWN GitHub repo — for an agent that ships RUNNABLE code (use this when findagent_import_repo returned grounding.code_bundle). Pass the basics (title/slug/tagline/description/category_slug + example_prompts: 1-5 required) + the detected contract from import_repo's grounding.code_bundle (runtime, entrypoint {path,export}, mcp {mode,command,args}, ui {path}, allowed_hosts, credential_slots, skills), overriding any you want to correct. The server RE-PULLS the repo (your stored GitHub token — private repos work, server-side), snapshots + scans the code, validates the manifest, and creates a status=draft agent you own; then call findagent_submit_for_review IN THIS MCP CLIENT to set price + confirm originality/prohibited + submit it (the web is only an optional preview). IDEMPOTENT BY REPO: if you already have a draft for this repo, calling this again OVERWRITES that same draft (basics + manifest + a fresh re-pull/re-scan) instead of creating a duplicate — so iterate freely (the response updated flag is true on overwrite). NEVER send secret credential VALUES — credential_slots declare shape (ref/env/label/allowed_hosts/type) only. Building/running the code stays gated until an admin approves it. Which tool for which part: Instructions, Skills and Actions are authored as an Agent Plugins package and sent as files with findagent_create_package_draft; Code (a Node or Python program) uses findagent_create_code_draft from your own GitHub repo; an MCP server you already run uses findagent_create_remote_mcp (hosted over https) or findagent_create_local_mcp (started on the buyer machine by a command); an OpenAPI spec becomes tools through findagent_import_openapi before findagent_create_draft; findagent_create_draft saves a declarative listing from findagent_import_repo grounding. Code part: start from https://github.com/FindAgent/agent-template (Node and Python variants). Building any part with an assistant: provider-neutral playbooks at https://github.com/FindAgent/agent-creators (start with AGENTS.md).

Input Schema

NameRequiredDescriptionDefault
uiNoOptional static UI: { path: bundle-relative index.html }.
mcpNoMCP exposure: { mode: 'wrap'|'native', command?, args? }. 'native' requires the command that starts the bundle's own MCP server. Defaults to wrap.
refNoOptional branch/tag/SHA. Defaults to the default branch HEAD.
llmsNoOptional target clients. Defaults to ['claude','chatgpt','gemini'] when omitted.
repoNoowner/repo or a github.com URL — YOUR repo (readable by your connected GitHub token). Re-pulled server-side, so private repos you own work.
slugNoPermanent URL slug, kebab-case (3–60, no leading/trailing hyphen). Verify with findagent_check_slug first.
tagsNoOptional (≤10). Free-form lowercase tags ([a-z0-9- ]).
titleNoAgent name (3–80 chars).
skillsNoOptional discovery metadata (the tools the agent exposes). Each: { id?, name, description?, input_schema? }. `input_schema` is the tool's JSON-Schema argument shape (type: object; bounded, no remote $ref) so a client can render real fields. A repo's own findagent.json `skills[]` fills any you omit. Never executed.
runtimeNoFrom grounding.code_bundle.runtime: { kind, version? } where kind is node or python (versions node22, node24, python3.13). Defaults to node.
taglineNoOne-line value prop (10–140).
languagesNoOptional (≤20). Language/Framework slugs from findagent_list_tech_facets (software-development discipline only).
entrypointNoFrom grounding.code_bundle.entrypoint: { path: bundle-relative module, export: handler name }.
descriptionNoWhat it does / who it is for (50–4000).
serve_modesNoHow the code runs when a buyer connects it. 'hosted' = FindAgent runs it in an isolated sandbox over the gateway (the DEFAULT — omit for this). 'local' = the buyer downloads and runs it on their OWN machine via @findagent/mcp so it can reach their localhost/local tools; FindAgent never runs it (the buyer trusts you, like a local MCP server). Pass ['hosted','local'] to offer BOTH. Only set this for an agent that must reach the buyer's own machine — an agent whose credential targets a localhost host CANNOT be served hosted. NOTE: this call OVERWRITES the draft's serve modes — when re-calling for an existing draft, re-send serve_modes to keep a prior 'local'/'both' choice (omitting it resets to hosted-only).
tech_domainsNoOptional (≤20). Tech Domain slugs from findagent_list_tech_facets (software-development discipline only).
allowed_hostsNoDefault-deny egress allowlist — the ONLY hosts the sandbox may reach. From grounding.code_bundle.allowed_hosts.
category_slugNoThe PRIMARY category: a TOP-LEVEL slug from findagent_list_categories (a discipline is required — usually 'software-development'). Put the required subdiscipline (and any industry + subindustry) in additional_category_slugs.
example_promptsNoREQUIRED — 1 to 5 concrete things a user can ask this agent to do (what a real user would type).
credential_slotsNoOptional. Each item declares the SHAPE of a secret (ref/env/label/allowed_hosts…) — see `items`. DEFINITIONS ONLY — no values.
additional_category_slugsNoOptional (≤12). Extra slugs from findagent_list_categories. For EVERY top-level you select you MUST include one of its OWN subcategories here: a subdiscipline under your discipline, and (optionally) an industry top-level plus one of its subindustries. This is also where a discipline goes if your primary is an industry.

Output Schema

NameRequiredDescriptionDefault
kindNo
slugNo
bundleNo
statusNo
accountNo
createdNo
updatedNo
next_toolNo
preview_urlNo
instructionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / skills / description
      Previous value: -"Optional discovery metadata (the tools the agent exposes). Each: { id?, name, description? }. Never executed."New value: +"Optional discovery metadata (the tools the agent exposes). Each: { id?, name, description?, input_schema? }. `input_schema` is the tool's JSON-Schema argument shape (type: object; bounded, no remote $ref) so a client can render real fields. A repo's own findagent.json `skills[]` fills any you omit. Never executed."
    • addedInput schema / properties / skills / items / properties / input_schema
      Added value: +{
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / runtime / description
      Previous value: -"From grounding.code_bundle.runtime: { kind: 'node'|'python', version? }. Defaults to node."New value: +"From grounding.code_bundle.runtime: { kind, version? } where kind is node or python (versions node22, node24, python3.13). Defaults to node."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark this as non-read-only, open-world, and non-destructive. The description adds substantial behavioral context beyond that: server-side repo re-pull using a stored GitHub token, private repo support, snapshot/scan/manifest validation, draft creation, idempotent overwrite-by-repo semantics with updated flag, prohibition on sending secret values, and gated build/run until admin approval. This is exactly the kind of operational detail an agent needs before invoking a write tool.

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?

The description is long, but the tool is complex: 21 parameters, nested objects, idempotency rules, and multiple sibling alternatives. It is front-loaded with purpose and usage, then proceeds through behavior and sibling routing. Some repetition and the external playbook links could be tightened, but nearly every sentence contributes to correct invocation or routing.

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 complexity, rich schema, annotations, and an output schema, the description is complete enough to call the tool correctly. It covers prerequisites, required vs optional inputs, idempotency/overwrite behavior, secret-handling rules, approval gating, and the next tool in the workflow. Return values need not be explained because an output schema exists.

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?

Schema description coverage is already 100%, so the baseline is 3. The description still adds useful parameter grouping and workflow semantics: it distinguishes the 'basics' from the detected contract fields taken from grounding.code_bundle, notes which values can be overridden, and reinforces that example_prompts is required and credential_slots are shape-only. It does repeat some schema-level detail, but the grouping and override guidance are meaningfully additive.

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 opens with a specific verb and resource: persist a CODE-BUNDLE draft from the user's own GitHub repo. It distinguishes this from sibling tools by explicitly naming findagent_create_package_draft, findagent_create_remote_mcp, findagent_create_local_mcp, findagent_import_openapi, and findagent_create_draft, with a clear rule for when each applies. An agent can identify this tool's scope without opening any schema.

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?

It states the exact trigger condition: use this when findagent_import_repo returned grounding.code_bundle. It also provides a complete sibling-routing paragraph covering Code vs Packages vs MCP vs OpenAPI vs declarative listings, and tells the caller to follow up with findagent_submit_for_review. Alternatives and exclusions are made explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources