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; 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

TableJSON 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

TableJSON 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?

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), it discloses server-side re-pull with the stored GitHub token, snapshot+scan+manifest validation, the resulting status=draft ownership, idempotency by repo with overwrite semantics and the `updated` flag, the prohibition on sending secret values, and that build/run stays gated until admin approval. This is unusually rich operational context.

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?

Purpose and trigger are front-loaded, but the body is a dense block that mixes invocation guidance with tangential material (GitHub template and agent-creators playbook URLs) that does not help select or call the tool. For a 21-param tool the length is largely justified, though trimming the trailing links would tighten it.

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?

For a 21-parameter, nested-object, multi-step creation tool with an output schema, the description covers the full workflow (import grounding, override, idempotent overwrite, gated run, submit-for-review) plus the secret-value guardrail. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds real value: it groups the required basics, points out that the detected contract (runtime/entrypoint/mcp/ui/allowed_hosts/credential_slots/skills) comes from import_repo's grounding.code_bundle, and says you may override any field. It also flags that credential_slots declare shape only, reinforcing the schema's warning.

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?

States a specific verb and resource ('Persist a CODE-BUNDLE draft from YOUR OWN GitHub repo') and explicitly scopes it to agents shipping runnable code. It also names each sibling (findagent_create_package_draft, findagent_create_remote_mcp, findagent_create_draft) and assigns the distinct part each handles, so an agent can route 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?

Gives an explicit trigger ('use this when findagent_import_repo returned grounding.code_bundle') and an explicit alternative for every other case. It also spells out the follow-on step ('then call findagent_submit_for_review IN THIS MCP CLIENT') and notes the web is only an optional preview.

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