← All tool references

Generators · not_available

Random Writing Constraint Generator

Random Writing Constraint with transparent inputs and reviewable results.

Open public tool

Overview

Category
Generators
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/random-writing-constraint-generator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/random-writing-constraint-generator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

genre · string · required
Enter genre. Accepted values: any, fiction, poetry, nonfiction.
quantity · number · required
Enter constraints.
difficulty · string · required
Enter difficulty. Accepted values: gentle, moderate, challenging.
{
    "type": "object",
    "properties": {
        "genre": {
            "type": "string",
            "description": "Enter genre.",
            "enum": [
                "any",
                "fiction",
                "poetry",
                "nonfiction"
            ]
        },
        "quantity": {
            "type": "number",
            "description": "Enter constraints."
        },
        "difficulty": {
            "type": "string",
            "description": "Enter difficulty.",
            "enum": [
                "gentle",
                "moderate",
                "challenging"
            ]
        }
    },
    "required": [
        "genre",
        "quantity",
        "difficulty"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

constraints · array
Generated constraints produced by the tool.
quantity · number
Constraint count produced by the tool.
prompt_seed · string
Prompt seed produced by the tool.
{
    "type": "object",
    "properties": {
        "constraints": {
            "type": "array",
            "description": "Generated constraints produced by the tool."
        },
        "quantity": {
            "type": "number",
            "description": "Constraint count produced by the tool."
        },
        "prompt_seed": {
            "type": "string",
            "description": "Prompt seed produced by the tool."
        }
    },
    "additionalProperties": false
}

Random Writing Constraint Generator worked example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/random-writing-constraint-generator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "genre": "any",
    "quantity": 4,
    "difficulty": "moderate"
}'
{
    "ok": true,
    "data": {
        "slug": "random-writing-constraint-generator",
        "result": {
            "values": {
                "constraints": [
                    {
                        "number": 1,
                        "constraint": "Include a list of three"
                    },
                    {
                        "number": 2,
                        "constraint": "Use exactly one line of dialogue"
                    },
                    {
                        "number": 3,
                        "constraint": "Avoid the letter E in one sentence"
                    },
                    {
                        "number": 4,
                        "constraint": "Set it during a storm"
                    }
                ],
                "quantity": 4,
                "prompt_seed": "any · moderate"
            },
            "display": {
                "display": "[{\"number\":1,\"constraint\":\"Include a list of three\"},{\"number\":2,\"constraint\":\"Use exactly one line of dialogue\"},{\"number\":3,\"constraint\":\"Avoid the letter E in one sentence\"},{\"number\":4,\"constraint\":\"Set it during a storm\"}]"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.