Skip to main content
Glama

create_product

Create a new product, run analysis, and return its initial stats.

    ``config_upload_id`` references a previously-staged .config that the
    caller POSTed to ``/api/configs/uploads`` over plain HTTP — the LLM
    does NOT emit the config text itself (a real kernel .config is
    ~100–200 KB and exceeds a single tool-call output budget). Workflow:

    1. Caller / wrapper script:
       ``curl -H "Authorization: Bearer ks_live_..." \
              -F "config_file=@.config" \
              https://kernelscan.io/api/configs/uploads``
       returns ``{config_upload_id, sha256, size_bytes, expires_at}``.
    2. Pass that ``config_upload_id`` into this tool.

    Uploads are per-user, single-use, and expire 30 minutes after upload.
    Same gates as POST /api/products: free can't create products; paid
    plans are capped at their resolved product limit — read it (and any
    per-account override) from ``whoami.product_limit`` rather than assuming
    a fixed per-tier number. ``factor_ids`` are silently ignored unless the
    plan allows security factors (``whoami.can_use_factors``). Re-using a
    product name returns 409.

    Creating a product RUNS an analysis, so it spends one unit of the
    team's SHARED monthly analysis allowance (``whoami.monthly_analyses_used``
    / ``monthly_analyses_limit``). When the allowance is exhausted the tool
    fails with "Monthly analysis limit reached (…/month) [429]". This is a
    durable monthly quota — NOT the transient per-call rate limit that also
    surfaces as 429: it will not clear until next month, so report it to the
    user instead of retrying. Check ``whoami`` before a batch of creates.

    ``kernel_version`` is the kernel's release. For a stable kernel that is
    its version (``6.6.67``). For a CIP SLTS kernel pass its CIP release or
    the full ``uname -r``: ``4.19.325-cip136``, ``4.19.325-cip136-rt50``;
    a trailing local suffix such as ``-yocto-standard`` is accepted and
    ignored. The ``-cipN`` counter decides which of CIP's own backported
    fixes apply, so pass it whenever the device runs a CIP kernel — a bare
    ``4.19.325`` is analysed as the final 4.19 stable release (the
    ``.config`` never names the ``-cipN``). The known CIP releases of a
    series are listed by ``GET /api/kernel-releases?flavor=cip&series=4.19``
    (add ``&rt=1`` for the RT tree). The returned
    ``kernel_release`` shows how the string was read (``flavor``, ``base``,
    ``series``, ``cip``, ``rt``, ``local``; null when the string is no
    release). Surrounding whitespace is trimmed. A version string the
    analysis cannot read (e.g. ``4.19.325cip136``, or anything non-ASCII)
    fails with "Unrecognized kernel version" [400] before anything is
    created or the upload is consumed.

    A CIP release must be on the stable base the uploaded ``.config``'s
    header names (the header shows the exact base; a CIP tag never changes
    it): ``4.19.300-cip90`` with a ``4.19.325`` config fails with "… is
    based on 4.19.300, but the .config header says 4.19.325" [400]. This is
    checked before the upload is consumed, so the same upload can be used
    again with the right release. A stable version, or a ``.config``
    without a version header, is not checked.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
archYes
nameYes
factor_idsNo
descriptionNo
kernel_versionYes
config_upload_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so richly: uploads are per-user, single-use, and expire in 30 minutes; creating spawns an analysis that spends a shared monthly allowance; factor_ids are silently ignored unless the plan permits factors; duplicate names return 409. It also details error semantics (400 on unreadable version, base-mismatch check occurring before upload consumption).

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

Conciseness3/5

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

The purpose is front-loaded and the workflow numbering is helpful, but the block is long and includes a full multi-line curl example plus parenthetical tangents that could be trimmed. Much of the detail is warranted given the domain, yet the volume exceeds what a well-sized tool description needs.

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 complex, quota-gated mutation with no annotations and no output schema, the description covers the workflow, plan gates, quotas, and version-parsing edge cases well. Gaps remain: the return value ('initial stats') is not described, and the required arch parameter is unaddressed.

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?

With 0% schema coverage the description must compensate, and it thoroughly explains config_upload_id (its origin endpoint and lifecycle), kernel_version (CIP vs stable, trailing suffix handling, -cipN significance, error strings), name (409 on reuse), and factor_ids (ignored under certain plans). However the required 'arch' and optional 'description' parameters are left entirely undocumented.

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?

Opens with a specific verb+resource+side-effect: 'Create a new product, run analysis, and return its initial stats.' An agent can immediately distinguish this from update_product, get_product, and list_products without inspecting 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?

Explicitly lays out the required pre-step (upload .config and pass config_upload_id), tells the agent to check whoami before batch creates, warns which tiers cannot create products, and distinguishes the durable 429 monthly quota from the transient rate limit ('report it to the user instead of retrying'). Genuine when/when-not guidance.

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