Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/commercetools/commerce-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/commercetools/commerce-mcp/extending-function-params)<a href="https://agentmods.dev/rules/commercetools/commerce-mcp/extending-function-params"><img src="https://agentmods.dev/badge/rules/commercetools/commerce-mcp/extending-function-params/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/commercetools/commerce-mcp/extending-function-params"><img src="https://agentmods.dev/badge/rules/commercetools/commerce-mcp/extending-function-params.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00600 | $0.00600 |
| Opus 5.5 | $0.00240 | $0.00240 |
| Sonnet 5.5 | $0.00120 | $0.00120 |
| Haiku 4.5 | $0.00060 | $0.00060 |
Grade A, and why
extending-function-params scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to extending-function-params — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
Always follow these steps in order:
-
Parameter Schema Update:
- Locate the parameters file (usually
typescript/src/shared/(namespace)/parameters.ts) - Add new parameters to the Zod schema
- For each parameter:
- Define the correct type (e.g., z.number(), z.array(z.string()))
- Add appropriate validations (e.g., .min(), .max())
- Mark as .optional() if not required
- Add .describe() with clear documentation
- Include examples in the description for complex types
- Locate the parameters file (usually
-
Function Implementation Update:
- Locate the function file (usually
typescript/src/shared/(namespace)/functions.ts) - Add new parameters to the queryArgs object
- Use spread operator with null checks for optional params
- Format:
...(params.newParam && {newParam: params.newParam}) - Remove any outdated comments
- Locate the function file (usually
-
Documentation Update:
- Locate the prompts file (usually named
typescript/src/shared/(namespace)/prompts.ts) - Update the function's prompt string
- For each parameter add:
- Parameter name
- Type information
- Optional/required status
- Default value if any
- Valid range if applicable
- Example usage for complex types
- Locate the prompts file (usually named
-
Test Coverage Update:
- Locate the test file (usually
typescript/src/shared/(namespace)/test/functions.test.ts) - Add/update test cases:
- Test with default parameters
- Test with all new parameters
- Test error scenarios
- Verify all parameters are correctly passed to the API
- Ensure proper mock setup and assertions
- Locate the test file (usually
-
Verification:
- Ensure all files are consistent with each other
- Parameter types match between schema and tests
- Examples in prompts match test cases
- All optional parameters handle undefined cases
- Error handling is properly tested
Example: When adding 'offset' parameter:
-
In parameters.ts:
offset: z .number() .int() .min(0) .optional() .describe('The number of items to skip before starting to collect the result set.') -
In functions.ts:
queryArgs: { ...(params.offset && {offset: params.offset}), } -
In prompts.ts:
- offset (int, optional): The number of items to skip before starting to collect the result set. -
In functions.test.ts:
it('should list products with all query parameters', async () => { const params = { offset: 40, // other params... }; // test implementation });
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 87 lines · 600 tokens per session scan A 3c7de024b27d
extending-function-params is a cursor rule published in the GitHub repository commercetools/commerce-mcp (4 stars, last pushed 2d ago), licensed MIT. It adds 600 tokens to every session, about $0.0024 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to extending-function-params, differing in 0 lines, and is treated as a copy.
Other cursor rules, from other repositories
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
config-validation-and-normalization
Config validation and normalization responsibilities (defineConfig normalizes, the orm section schema validates and resolves paths, the loader reports per-section diagnostics).