# Semantic layer query, defined with a sourced example

GLOSSARY, read 10 Nov 2026

**The short answer.** A query written against defined metrics and dimensions instead of raw tables. The semantic layer turns it into SQL, so every agent that asks for revenue gets the same definition of revenue. Per Cube's docs, its runQuery tool runs Cube SQL against views whose names and members come from the searchDataModel tool.

## Definition

A query written against defined metrics and dimensions instead of raw tables. The semantic layer turns it into SQL, so every agent that asks for revenue gets the same definition of revenue.

## Example from a real server

**Example.** Per Cube's docs, its runQuery tool runs Cube SQL against views whose names and members come from the searchDataModel tool.

## Related terms

- [service account](/glossary/service-account/): A non-human identity with its own role, used by unattended agents and jobs.
- [stdio transport](/glossary/stdio-transport/): A way to run an MCP server as a local subprocess.
- [row-level security](/glossary/row-level-security/): A rule that filters which rows a person may read in a table or model, often by role or department.

## Where to read more

- [The directory](/)
- [All glossary terms](/glossary/)

## Sources

- docs.cube.dev/docs/integrations/mcp-server.md: https://docs.cube.dev/docs/integrations/mcp-server.md (read 10 Nov 2026)

Last reviewed 10 Nov 2026. Canonical: https://datamcpservers.com/glossary/semantic-layer-query/
