Sass (indented syntax) — 18 Operations for AI Agents
This page is the canonical reference an AI coding agent uses to refactor, query, and analyze Sass (indented syntax) code through the act MCP server. 18 operations available: 0 refactor, 18 query, 0 analysis. Each operation is callable from Claude Code, Cursor, Codex, OpenCode, or any MCP-compatible agent host. Click any operation for a stable anchor link suitable for citation.
Worked Sass (indented syntax) examples
act101 reads indented-syntax Sass, where nesting is set by indentation and a mixin is declared with = and included with +, with the tree-sitter grammar for that syntax rather than SCSS's. The skeleton reports a stylesheet's @use modules, its $ variables as constants, its @function and = mixin definitions as functions, and every rule set, nested ones included, as a class named by its selector. symbols keeps the variables, functions and mixins, and names class rules by their bare class name. Each example below is the verbatim output of the command shown, run against the file shown. Query outputs are pretty-printed with the timing block omitted.
Outline a stylesheet's modules, variables, mixins and rules
storefront.sass styles a product card: it loads sass:math, sets a brand colour and a gutter, defines a to-rem function and an elevated mixin, and nests a .price-tag rule and a &:hover state inside .product-card.
$ act query skeleton storefront.sass
Before
@use "sass:math"
$brand-teal: #0f766e
$gutter: 1.25rem
@function to-rem($px)
@return math.div($px, 16) * 1rem
=elevated($depth: 2)
box-shadow: 0 #{$depth * 2}px #{$depth * 4}px rgba(0, 0, 0, 0.18)
.product-card
+elevated(3)
margin-bottom: $gutter
.price-tag
padding: to-rem(4) to-rem(12)
background: $brand-teal
color: white
&:hover
+elevated(5)
Output
{
"type": "Skeleton",
"declarations": [
{
"kind": "import",
"name": "\"sass:math\"",
"range": {
"start": {
"file": "storefront.sass",
"line": 1,
"column": 1,
"byte_offset": 0
},
"end": {
"file": "storefront.sass",
"line": 3,
"column": 1,
"byte_offset": 18
}
},
"name_range": {
"start": {
"file": "storefront.sass",
"line": 1,
"column": 6,
"byte_offset": 5
},
"end": {
"file": "storefront.sass",
"line": 1,
"column": 17,
"byte_offset": 16
}
}
},
{
"kind": "constant",
"name": "$brand-teal",
"range": {
"start": {
"file": "storefront.sass",
"line": 3,
"column": 1,
"byte_offset": 18
},
"end": {
"file": "storefront.sass",
"line": 4,
"column": 1,
"byte_offset": 39
}
},
"name_range": {
"start": {
"file": "storefront.sass",
"line": 3,
"column": 1,
"byte_offset": 18
},
"end": {
"file": "storefront.sass",
"line": 3,
"column": 12,
"byte_offset": 29
}
}
},
{
"kind": "constant",
"name": "$gutter",
"range": {
"start": {
"file": "storefront.sass",
"line": 4,
"column": 1,
"byte_offset": 39
},
"end": {
"file": "storefront.sass",
"line": 6,
"column": 1,
"byte_offset": 57
}
},
"name_range": {
"start": {
"file": "storefront.sass",
"line": 4,
"column": 1,
"byte_offset": 39
},
"end": {
"file": "storefront.sass",
"line": 4,
"column": 8,
"byte_offset": 46
}
}
},
{
"kind": "function",
"name": "to-rem",
"range": {
"start": {
"file": "storefront.sass",
"line": 6,
"column": 1,
"byte_offset": 57
},
"end": {
"file": "storefront.sass",
"line": 9,
"column": 1,
"byte_offset": 115
}
},
"name_range": {
"start": {
"file": "storefront.sass",
"line": 6,
"column": 11,
"byte_offset": 67
},
"end": {
"file": "storefront.sass",
"line": 6,
"column": 17,
"byte_offset": 73
}
}
},
{
"kind": "function",
"name": "elevated",
"range": {
"start": {
"file": "storefront.sass",
"line": 9,
"column": 1,
"byte_offset": 115
},
"end": {
"file": "storefront.sass",
"line": 12,
"column": 1,
"byte_offset": 205
}
},
"name_range": {
"start": {
"file": "storefront.sass",
"line": 9,
"column": 2,
"byte_offset": 116
},
"end": {
"file": "storefront.sass",
"line": 9,
"column": 10,
"byte_offset": 124
}
}
},
{
"kind": "class",
"name": ".product-card",
"range": {
"start": {
"file": "storefront.sass",
"line": 12,
"column": 1,
"byte_offset": 205
},
"end": {
"file": "storefront.sass",
"line": 21,
"column": 1,
"byte_offset": 378
}
},
"name_range": {
"start": {
"file": "storefront.sass",
"line": 12,
"column": 1,
"byte_offset": 205
},
"end": {
"file": "storefront.sass",
"line": 12,
"column": 14,
"byte_offset": 218
}
}
},
{
"kind": "class",
"name": ".price-tag",
"range": {
"start": {
"file": "storefront.sass",
"line": 15,
"column": 3,
"byte_offset": 261
},
"end": {
"file": "storefront.sass",
"line": 19,
"column": 3,
"byte_offset": 353
}
},
"name_range": {
"start": {
"file": "storefront.sass",
"line": 15,
"column": 3,
"byte_offset": 261
},
"end": {
"file": "storefront.sass",
"line": 15,
"column": 13,
"byte_offset": 271
}
}
},
{
"kind": "class",
"name": "&:hover",
"range": {
"start": {
"file": "storefront.sass",
"line": 19,
"column": 3,
"byte_offset": 353
},
"end": {
"file": "storefront.sass",
"line": 21,
"column": 1,
"byte_offset": 378
}
},
"name_range": {
"start": {
"file": "storefront.sass",
"line": 19,
"column": 3,
"byte_offset": 353
},
"end": {
"file": "storefront.sass",
"line": 19,
"column": 10,
"byte_offset": 360
}
}
}
]
}
The sass:math load is a module, $brand-teal and $gutter are constants, to-rem and elevated are both functions, and .price-tag and &:hover appear as classes of their own, with ranges inside .product-card's.
List the names a stylesheet defines
The same file, read for the names a refactor would target rather than for its outline.
$ act query symbols storefront.sass
Before
@use "sass:math"
$brand-teal: #0f766e
$gutter: 1.25rem
@function to-rem($px)
@return math.div($px, 16) * 1rem
=elevated($depth: 2)
box-shadow: 0 #{$depth * 2}px #{$depth * 4}px rgba(0, 0, 0, 0.18)
.product-card
+elevated(3)
margin-bottom: $gutter
.price-tag
padding: to-rem(4) to-rem(12)
background: $brand-teal
color: white
&:hover
+elevated(5)
Output
{
"type": "Symbols",
"symbols": [
{
"name": "$brand-teal",
"kind": "constant",
"range": {
"start": {
"file": "storefront.sass",
"line": 3,
"column": 1,
"byte_offset": 18
},
"end": {
"file": "storefront.sass",
"line": 3,
"column": 12,
"byte_offset": 29
}
},
"visibility": "unknown"
},
{
"name": "$gutter",
"kind": "constant",
"range": {
"start": {
"file": "storefront.sass",
"line": 4,
"column": 1,
"byte_offset": 39
},
"end": {
"file": "storefront.sass",
"line": 4,
"column": 8,
"byte_offset": 46
}
},
"visibility": "unknown"
},
{
"name": "to-rem",
"kind": "function",
"range": {
"start": {
"file": "storefront.sass",
"line": 6,
"column": 11,
"byte_offset": 67
},
"end": {
"file": "storefront.sass",
"line": 6,
"column": 17,
"byte_offset": 73
}
},
"visibility": "unknown"
},
{
"name": "elevated",
"kind": "function",
"range": {
"start": {
"file": "storefront.sass",
"line": 9,
"column": 2,
"byte_offset": 116
},
"end": {
"file": "storefront.sass",
"line": 9,
"column": 10,
"byte_offset": 124
}
},
"visibility": "unknown"
},
{
"name": "product-card",
"kind": "class",
"range": {
"start": {
"file": "storefront.sass",
"line": 12,
"column": 2,
"byte_offset": 206
},
"end": {
"file": "storefront.sass",
"line": 12,
"column": 14,
"byte_offset": 218
}
},
"visibility": "unknown"
},
{
"name": "price-tag",
"kind": "class",
"range": {
"start": {
"file": "storefront.sass",
"line": 15,
"column": 4,
"byte_offset": 262
},
"end": {
"file": "storefront.sass",
"line": 15,
"column": 13,
"byte_offset": 271
}
},
"visibility": "unknown"
}
]
}
The two class rules are named product-card and price-tag without the leading dot; the @use line and the &:hover parent-selector rule, which declare no name, are not listed.
Query
18 query tools, the same on every supported language. Descriptions live in the shared reference: /docs/query-tools.
callers control_flow data_flow definition diagnostics effect_closure effect_summary fix_auto get_type graph import_organize interface mutations references repo_outline skeleton symbols symbols_batch