Skip to main content
Glama

manage_state

Create and manage stateful mock resources with CRUD operations that persist data across requests. Perform actions like overview, add, list, get, create, reset, and delete.

Instructions

Manage stateful mock resources — CRUD collections that persist data across requests. Use 'overview' to see all resources, 'add_resource' to create a new resource with full table configuration, 'list_items' to browse items in a resource, 'get_item' for a specific item, 'create_item' to add data, 'reset' to restore seed data, or 'delete_resource' to fully unregister a resource.

Examples: Overview: {"action":"overview"} Add resource:{"action":"add_resource","resource":"users"} Add resource:{"action":"add_resource","resource":"customers","id_strategy":"prefix","id_prefix":"cus_","seed_data":[{"name":"Alice"}]} List items: {"action":"list_items","resource":"users","limit":10} Get item: {"action":"get_item","resource":"users","item_id":"abc123"} Create item: {"action":"create_item","resource":"users","data":{"name":"Alice"}} Reset: {"action":"reset","resource":"users"} Delete resource: {"action":"delete_resource","resource":"users"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesOperation to perform
dataNoItem data (required for create_item)
id_fieldNoCustom ID field name (default: 'id', for add_resource)
id_prefixNoPrefix for generated IDs when id_strategy is 'prefix' (e.g., 'cus_' for customer IDs)
id_strategyNoID generation strategy for new items
item_idNoItem ID (required for get_item)
limitNoMax items for list_items
max_itemsNoMaximum number of items the resource can hold (0 = unlimited)
offsetNoPagination offset for list_items
orderNoSort order: asc or descdesc
parent_fieldNoForeign key field name for nested/child resources
relationshipsNoRelationship definitions for ?expand[] support. Map of field name to {table, field} objects.
resourceNoResource name (required for add_resource/list_items/get_item/create_item/reset/delete_resource)
responseNoResponse transform configuration. Controls how list/get responses are shaped (envelope, pagination, field mapping).
seed_dataNoInitial data items to populate the resource with. Each item is an object.
sortNoSort field for list_itemscreatedAt
Behavior3/5

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

With no annotations, the description must disclose all behavioral traits. It mentions persistence and lists destructive actions (reset, delete_resource), but lacks details on side effects, authorization, idempotency, or error handling, which are important for safe invocation.

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?

The description is front-loaded with a clear summary, followed by a bulleted action list and well-structured JSON examples. It is somewhat lengthy but efficient given the tool's complexity.

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

Completeness3/5

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

While the description covers all actions and gives examples, it lacks output descriptions for each action (no output schema provided), and does not address error handling, edge cases, or data limits, leaving some gaps for a tool of this complexity.

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?

The description adds significant value beyond the already comprehensive schema by providing concrete examples for each action, illustrating parameter usage, relationships, and transformations, which helps agents understand how parameters combine.

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?

The description clearly states 'Manage stateful mock resources — CRUD collections that persist data across requests,' uses specific verb 'manage' with resource 'stateful mock resources,' and distinguishes from siblings like manage_mock and manage_workspace by focusing on stateful persistence.

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

Usage Guidelines4/5

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

The description implicitly indicates when to use this tool (for CRUD on stateful mock resources) and provides examples for each action, but does not explicitly state exclusions or direct comparisons to alternatives, leaving some ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/getmockd/mockd'

If you have feedback or need assistance with the MCP directory API, please join our Discord server