{"uid":"cap_v7D_7WrgToxfUdAvoZaJT","slug":"toll402-forge-on-demand-tool-generator-efd1c1de","name":"Toll402 Forge — On-Demand Tool Generator","description":"Create a NEW tool from a description, an input schema and test examples. The code is generated, run in a sandbox against your examples (up to 3 attempts), and on success published as a paid endpoint /v1/t/<name> for every agent. Infinite tools, on demand.","url":"https://toll402.dev/v1/forge","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["name","description","inputSchema","examples"],"properties":{"name":{"type":"string","maxLength":40,"minLength":3,"description":"Tool name (becomes the endpoint slug)"},"tags":{"type":"array","items":{"type":"string","maxLength":30},"default":[],"maxItems":8},"creator":{"type":"string","maxLength":80,"description":"Your wallet address or agent id, for attribution"},"examples":{"type":"array","items":{"type":"object","required":["input"],"properties":{"input":{"type":"object","additionalProperties":true},"expectedOutput":{}},"additionalProperties":false},"maxItems":5,"minItems":1,"description":"Test cases; the tool must pass them to be published"},"priceUsd":{"type":"number","default":0.005,"maximum":0.05,"minimum":0.001,"description":"Price per call for other agents (you never pay to use your own tool's endpoint less than this either)"},"description":{"type":"string","maxLength":1000,"minLength":20,"description":"What the tool does, precisely. Mention data sources (public URLs/APIs without keys) if any."},"inputSchema":{"type":"object","description":"JSON Schema (type object) for the input","additionalProperties":true},"allowNetwork":{"type":"boolean","default":true,"description":"Whether the tool may call public HTTP endpoints"},"outputSchema":{"type":"object","description":"JSON Schema for the output (recommended)","additionalProperties":true}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"ms":{"type":"integer"},"ok":{"type":"boolean"},"tool":{"type":"string"},"result":{"type":"object","properties":{"tool":{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"},"price":{"type":"string"}}},"attempts":{"type":"integer"},"published":{"type":"boolean"}}}}}}}}},"responseSchema":{"type":"json","example":{"tool":{"url":"https://toll402.dev/v1/t/hn_top","name":"hn_top","price":"$0.005"},"attempts":1,"published":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.25","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_y-xSEuQ5HGFe6RZRcKKmJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.25","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates, sandboxes, and publishes a new paid API endpoint from a description, input schema, and test examples","exampleAgentPrompt":"Create a new tool called 'hex-to-rgb' that converts a hex color string to its RGB components — describe it as 'Converts a hex color code like #FF5733 to an RGB object', set the input schema to accept a field called hex (string), provide one test example with input {\"hex\":\"#FF5733\"} and expected output {\"r\":255,\"g\":87,\"b\":51}, and price it at $0.005 per call.","exampleUseCases":[{"title":"Publishing a currency rounding tool","prompt":"Forge me a new tool called 'round-currency' that rounds a dollar amount to the nearest cent — the input should be a number field called 'amount', include a test case with input {\"amount\":1.456} expecting output {\"rounded\":1.46}, and price it at $0.005 per call."},{"title":"Deploying a slug-generator endpoint","prompt":"Create a new Toll402 tool named 'slugify' that turns any string into a URL-safe slug (lowercase, hyphens instead of spaces), describe it as 'Converts a human-readable title to a URL slug', schema takes a 'title' string field, give it a test with {\"title\":\"Hello World\"} expecting {\"slug\":\"hello-world\"}, and set the price to $0.005."},{"title":"Building a math expression evaluator","prompt":"I want to publish a tool called 'eval-expr' on toll402 that evaluates a simple arithmetic expression string and returns the numeric result — input schema has a field 'expr' (string), add a test example with {\"expr\":\"3 * (4 + 2)\"} expecting {\"result\":18}, allow network access off, and price it at $0.01 per call."}],"resultDescription":"Returns a JSON object indicating whether the tool was successfully generated and published, including the new endpoint slug (e.g. /v1/t/<name>), sandbox run outcomes across up to 3 attempts, execution time in milliseconds, and the tool's metadata (description, price, tags, creator).","failureModes":["Sandbox test cases fail after 3 generation attempts — tool is not published and error details are returned","Invalid or incomplete input schema causes a validation error before code generation","Tool name too short (<3 chars), too long (>40 chars), or already taken — returns a conflict or validation error","Generated code calls disallowed network resources when allowNetwork is false","Price outside allowed range (0.001–0.05 USD) triggers validation failure","Description too short (<20 chars) or too long (>1000 chars) returns a schema error"],"whenToPreferThis":"Use this endpoint when you need to dynamically create and publish a brand-new callable tool at runtime — especially when no existing endpoint matches your needs and you want it immediately available to all agents as a paid micro-API. Prefer this over static tool registries when the tool logic can be described in a short description and validated with a few examples. Not suitable for tools requiring private API keys, persistent databases, or complex multi-step orchestration.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:04:00.270Z","isFirstParty":false}