Commerce MCP Tools
Reference map for StateSet MCP tools, grouped by domain with example payloads.
How It Works
- Find the tool by domain (orders, inventory, returns, etc).
- Use the parameter list and example payload.
- Cross-check with the source definitions if needed.
- Validate the response shape against the expected schema.
- Handle error codes and retry transient failures.
Status Flows
- Tool Call: composed -> validated -> sent -> response_received -> parsed
- Debugging: error_logged -> params_checked -> source_verified -> call_retried
Usage
- CLI:
stateset --help to list available MCP tool commands.
- MCP tools: all
list_*, get_*, create_*, update_* tools documented in references.
Use this skill when you need to:
- Construct MCP tool calls for commerce-orders, commerce-customers, or commerce-inventory.
- Verify parameter names and shapes.
- Debug tool failures.
Permissions
- Read:
get_*, list_*, mcp list-tools, mcp validate — no --apply needed.
- Write:
create_*, update_*, delete_* — requires --apply.
Examples
stateset mcp call create_order '{"customerId":"cust_123","items":[{"sku":"SKU-001","quantity":1,"unitPrice":29.99}]}'
stateset mcp call get_order '{"orderId":"ord_456"}'
stateset mcp list-tools --domain inventory
stateset mcp validate '{"tool":"adjust_inventory","params":{"sku":"WIDGET-001","quantity":10}}'
Output
{"tool":"create_order","params":{"customerId":"<uuid>","items":[{"sku":"SKU-001","name":"Widget","quantity":1,"unitPrice":29.99}]},"required":["customerId","items"],"method":"POST"}
Present Results to User
- Tool name and parameter payload.
- Any required vs optional fields.
- Source file for the tool definition.
- Example response shape and common error codes.
Troubleshooting
- Tool not found: verify the MCP server is running and
MCP_SERVER_URL is set.
- Param mismatch: compare against the reference map and source file in
mcp-tools.js.
- Auth rejected: check
STATESET_API_KEY and token expiry in the MCP server config.
- Timeout on tool call: confirm network access and increase
mcp_timeout_ms if needed.
Error Codes
MCP_TOOL_NOT_FOUND: The requested tool name does not exist on the MCP server.
MCP_PARAM_VALIDATION: One or more required parameters are missing or have an invalid type.
MCP_AUTH_REJECTED: API key is invalid or expired; re-check STATESET_API_KEY and token expiry.
Related Skills
- commerce-engine-setup — Install and start the MCP server locally.
- order-reason-workflows — Workflows that invoke MCP tools for order actions.
- customer-response-workflows — Response workflows that call
get_order and get_customer.
- sandbox-migration — Sandbox agents that use MCP tools via injected configs.
References
- references/mcp-tools-map.md
- /home/dom/stateset-icommerce/cli/src/mcp-server.js
- /home/dom/stateset-icommerce/cli/src/autonomous/mcp-tools.js
1---2name: commerce-mcp-tools3description: Reference for StateSet MCP tool names, parameters, and example payloads. Use when composing or debugging `mcp__stateset-commerce__` tool calls or reviewing MCP schemas.4---56# Commerce MCP Tools78Reference map for StateSet MCP tools, grouped by domain with example payloads.910## How It Works11121. Find the tool by domain (orders, inventory, returns, etc).132. Use the parameter list and example payload.143. Cross-check with the source definitions if needed.154. Validate the response shape against the expected schema.165. Handle error codes and retry transient failures.1718## Status Flows1920- **Tool Call:** composed -> validated -> sent -> response_received -> parsed21- **Debugging:** error_logged -> params_checked -> source_verified -> call_retried2223## Usage2425- CLI: `stateset --help` to list available MCP tool commands.26- MCP tools: all `list_*`, `get_*`, `create_*`, `update_*` tools documented in references.2728Use this skill when you need to:29- Construct MCP tool calls for commerce-orders, commerce-customers, or commerce-inventory.30- Verify parameter names and shapes.31- Debug tool failures.3233## Permissions3435- Read: `get_*`, `list_*`, `mcp list-tools`, `mcp validate` — no `--apply` needed.36- Write: `create_*`, `update_*`, `delete_*` — requires `--apply`.3738## Examples3940```bash41stateset mcp call create_order '{"customerId":"cust_123","items":[{"sku":"SKU-001","quantity":1,"unitPrice":29.99}]}'42stateset mcp call get_order '{"orderId":"ord_456"}'43stateset mcp list-tools --domain inventory44stateset mcp validate '{"tool":"adjust_inventory","params":{"sku":"WIDGET-001","quantity":10}}'45```4647## Output4849```json50{"tool":"create_order","params":{"customerId":"<uuid>","items":[{"sku":"SKU-001","name":"Widget","quantity":1,"unitPrice":29.99}]},"required":["customerId","items"],"method":"POST"}51```5253## Present Results to User5455- Tool name and parameter payload.56- Any required vs optional fields.57- Source file for the tool definition.58- Example response shape and common error codes.5960## Troubleshooting6162- Tool not found: verify the MCP server is running and `MCP_SERVER_URL` is set.63- Param mismatch: compare against the reference map and source file in `mcp-tools.js`.64- Auth rejected: check `STATESET_API_KEY` and token expiry in the MCP server config.65- Timeout on tool call: confirm network access and increase `mcp_timeout_ms` if needed.6667## Error Codes6869- `MCP_TOOL_NOT_FOUND`: The requested tool name does not exist on the MCP server.70- `MCP_PARAM_VALIDATION`: One or more required parameters are missing or have an invalid type.71- `MCP_AUTH_REJECTED`: API key is invalid or expired; re-check `STATESET_API_KEY` and token expiry.7273## Related Skills7475- **commerce-engine-setup** — Install and start the MCP server locally.76- **order-reason-workflows** — Workflows that invoke MCP tools for order actions.77- **customer-response-workflows** — Response workflows that call `get_order` and `get_customer`.78- **sandbox-migration** — Sandbox agents that use MCP tools via injected configs.7980## References8182- references/mcp-tools-map.md83- /home/dom/stateset-icommerce/cli/src/mcp-server.js84- /home/dom/stateset-icommerce/cli/src/autonomous/mcp-tools.js