Saiku is an open-source semantic layer that represents data as analytical cubes for browser exploration, SQL queries, dashboards, and AI-agent access. It is for analysts and applications that need to query structured business data through Mondrian, Apache Calcite, REST, or MCP. The catalogue instruction helps agents work with Saiku.
Borrowing it
Nothing to install: this file belongs to spiculedata/saiku. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/spiculedata/saiku/development/.github/prompts/add-rest-endpoint.prompt.mdgit clone --depth 1 https://github.com/spiculedata/saikuWrote 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/commands/spiculedata/saiku/add-rest-endpoint)<a href="https://agentmods.dev/commands/spiculedata/saiku/add-rest-endpoint"><img src="https://agentmods.dev/badge/commands/spiculedata/saiku/add-rest-endpoint/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/commands/spiculedata/saiku/add-rest-endpoint"><img src="https://agentmods.dev/badge/commands/spiculedata/saiku/add-rest-endpoint.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.00019 | $0.00434 |
| Opus 5.5 | $0.00008 | $0.00174 |
| Sonnet 5.5 | $0.00004 | $0.00087 |
| Haiku 4.5 | $0.00002 | $0.00043 |
Grade A, and why
add-rest-endpoint 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.
What it actually says
Add a REST endpoint: ${input:endpoint:method, path and purpose, e.g. "GET /ai/foo — list foos"}.
- Resource: a Jersey 3.1 class in
saiku-core/saiku-web/src/main/java/org/saiku/web/rest/resources/usingjakarta.ws.rs.*, never Spring@RestController. Add the method to an existing resource if the path belongs to one, e.g.AiQueryResourcefor/ai/*. - Wiring: declare the bean in
saiku-webapp/src/main/webapp/WEB-INF/saiku-beans.xmlwith setter<property>injection (no@Autowired, no@Configuration).SaikuJerseyApplicationregisters every Spring bean annotated with@Pathautomatically, so there's no separate Jersey registration step. Request-scoped resources that touch session-scoped beans need<aop:scoped-proxy/>. - Security: use
@RolesAllowedfor admin-only endpoints. Validate every input at the boundary. Never put exception messages, class names or SQL/MDX in responses;GenericExceptionMapperexists to prevent leaks, so return typed errors instead. - AI Query surface (
/ai/*): keep the typed contract:VALIDATION_ERROR400s withfieldandavailablecandidate lists, and never expose MDX. Updatedocs/AI-QUERY-API.mdfor contract changes. - Tests: a resource test in
saiku-core/saiku-web/src/test/java/org/saiku/web/rest/resources/, plus a launcher IT if the endpoint needs a live cube. Bump the module's floor in.github/test-floors.jsonif you add tests. - Finish:
mvn spotless:apply,mvn -pl saiku-core/saiku-web -am verify, and a PR againstdevelopmentper AGENTS.md.
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 · 14 lines · 19 tokens per session scan A af49218a3d9a
add-rest-endpoint is a command published in the GitHub repository spiculedata/saiku (1,334 stars, last pushed yesterday), licensed Apache-2.0. It adds 19 tokens to every session and 434 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-29.
Other commands, from other repositories
cloudflare-durable-objects:setup
Interactive Durable Objects project initialization. Scaffolds new DO project with proper bindings, migrations, and boilerplate code.
load-test
Generate load testing scenarios (k6/Locust) from API contracts with realistic traffic patterns.
apim-contract-diff
Execute the apim contract diff workflow with deterministic validation and redacted output.
e2e
Generate and run end-to-end API tests with Testcontainers for Spring Boot (MVC and WebFlux) applications.
api-mock
You are an API mocking expert specializing in creating realistic mock services for development, testing, and demonstration purposes. Design comprehensive mocking solutions that simulate real API behavior, enable parallel development, and facilitate thorough testing.
api-mock
You are an API mocking expert specializing in creating realistic mock services for development, testing, and demonstration purposes. Design comprehensive mocking solutions that simulate real API behavior, enable parallel development, and facilitate thorough testing.