Skip to main content
Glama

l402_create_resource

Create or update a protected L402 gateway resource with a sat price, optional description, content type, and TTL so AI agents can manage paid access.

Instructions

Create or update a protected resource on the configured L402 gateway.

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": {
      "resource_id": "<resource_id>",
      "price_sats": "<price_sats>"
    },
    "name": "l402_create_resource"
  }
}

Input Schema

NameRequiredDescriptionDefault
price_satsYesPrice in sats
descriptionNoOptional resource description
resource_idYesResource identifier
ttl_secondsNoOptional resource TTL in seconds
content_typeNoOptional content type

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it says nothing about idempotency, whether an update replaces the whole resource or only supplied fields, side effects on existing resources, permission requirements, or what the call returns. For a mutation tool with zero annotation coverage this is a substantial gap.

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 the verb leading and no filler. It is efficient, but the brevity reflects under-specification rather than tight editing.

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

Completeness2/5

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

For a five-parameter mutation tool with no annotations and no output schema, the description leaves critical context unexplained: what a protected resource is on an L402 gateway, partial-vs-full update semantics, and any notion of what comes back (e.g., payment terms or an invoice). An agent would need to guess before invoking it.

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 (resource_id, price_sats, description, ttl_seconds, content_type) are already documented in the schema. The description adds no meaning beyond that, which matches the baseline-3 expectation when the schema does the work.

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?

The description uses a specific verb pair ("Create or update") and a specific resource ("protected resource") with a stated scope ("configured L402 gateway"). This distinguishes it from siblings like l402_delete_resource and l402_list_resources without needing to name them, though it never clarifies what an L402 protected resource actually is.

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

Usage Guidelines2/5

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

There is no when-to-use guidance: no statement of prerequisites (gateway configuration, credentials), no indication of when to prefer this over l402_delete_resource, l402_list_resources, or l402_inspect, and no explanation of how 'create' differs from 'update' behaviorally. The agent must infer everything from the name and sibling list.

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