Smalltalk — 18 Operations for AI Agents

Smalltalk systems carry decades of live, image-based business logic still in production. act101 navigates classes and methods structurally, so agents work in one of computing's most storied environments with modern precision.

This page is the canonical reference an AI coding agent uses to refactor, query, and analyze Smalltalk 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.

18Query

Worked Smalltalk examples

act101 reads a Smalltalk (Tonel) file's Class { ... } metadata block as a declaration, tagging it block in the skeleton and class in symbols, named for its STON #name value. Both queries also read each >>-style method definition as a declaration: the skeleton names every method after its enclosing class, so a file with several methods reports the same name repeatedly, while symbols names each method after its own selector — a unary name like pickNext, or a keyword like forBin: — and adds every parameter identifier as its own entry beside it. The unit of structure in this grammar is the method definition itself: neither query reads the { #category : ... } metadata block that precedes each method, or descends into a method's own statements beyond its parameter list. 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.

Read the pick run's class header and methods as a skeleton

PickRun.st is a Tonel-format class for warehouse pick runs: the class header declares its bin/totes/remaining instance variables, and three methods build a run, initialize it, and advance through its totes.

$ act query skeleton PickRun.st

Before

Class {
	#name : #PickRun,
	#superclass : #Object,
	#instanceVariables : [ 'bin', 'totes', 'remaining' ],
	#category : #'Warehouse-Picking'
}

{ #category : #'instance creation' }
PickRun class >> forBin: aBin totes: aTotes [
	| run |
	run := self new.
	run setBin: aBin totes: aTotes.
	^ run
]

{ #category : #accessing }
PickRun >> setBin: aBin totes: aTotes [
	bin := aBin.
	totes := aTotes.
	remaining := totes size.
]

{ #category : #picking }
PickRun >> pickNext [
	remaining <= 0
		ifTrue: [ ^ nil ].
	remaining := remaining - 1.
	^ totes at: totes size - remaining
]

Output

{
    "type": "Skeleton",
    "declarations": [
        {
            "kind": "block",
            "name": "#PickRun",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 1,
                    "column": 1,
                    "byte_offset": 0
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 6,
                    "column": 2,
                    "byte_offset": 141
                }
            },
            "name_range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 2,
                    "column": 10,
                    "byte_offset": 17
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 2,
                    "column": 18,
                    "byte_offset": 25
                }
            }
        },
        {
            "kind": "block",
            "name": "PickRun",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 8,
                    "column": 1,
                    "byte_offset": 143
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 14,
                    "column": 2,
                    "byte_offset": 294
                }
            },
            "name_range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 9,
                    "column": 1,
                    "byte_offset": 180
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 9,
                    "column": 8,
                    "byte_offset": 187
                }
            }
        },
        {
            "kind": "block",
            "name": "PickRun",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 16,
                    "column": 1,
                    "byte_offset": 296
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 21,
                    "column": 2,
                    "byte_offset": 422
                }
            },
            "name_range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 17,
                    "column": 1,
                    "byte_offset": 323
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 17,
                    "column": 8,
                    "byte_offset": 330
                }
            }
        },
        {
            "kind": "block",
            "name": "PickRun",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 23,
                    "column": 1,
                    "byte_offset": 424
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 29,
                    "column": 2,
                    "byte_offset": 574
                }
            },
            "name_range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 24,
                    "column": 1,
                    "byte_offset": 449
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 24,
                    "column": 8,
                    "byte_offset": 456
                }
            }
        }
    ]
}

The skeleton reports four declarations: the class header as block named #PickRun, and the three methods — forBin:totes:, setBin:totes:, pickNext — also as block, but all three named PickRun rather than their own selector, since the rule reads the method's enclosing class name instead of its selector.

List the class and each method under its own selector, with parameters

forBin:totes: and setBin:totes: each take two parameters, aBin and aTotes; pickNext takes none.

$ act query symbols PickRun.st

Before

Class {
	#name : #PickRun,
	#superclass : #Object,
	#instanceVariables : [ 'bin', 'totes', 'remaining' ],
	#category : #'Warehouse-Picking'
}

{ #category : #'instance creation' }
PickRun class >> forBin: aBin totes: aTotes [
	| run |
	run := self new.
	run setBin: aBin totes: aTotes.
	^ run
]

{ #category : #accessing }
PickRun >> setBin: aBin totes: aTotes [
	bin := aBin.
	totes := aTotes.
	remaining := totes size.
]

{ #category : #picking }
PickRun >> pickNext [
	remaining <= 0
		ifTrue: [ ^ nil ].
	remaining := remaining - 1.
	^ totes at: totes size - remaining
]

Output

{
    "type": "Symbols",
    "symbols": [
        {
            "name": "#PickRun",
            "kind": "class",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 2,
                    "column": 10,
                    "byte_offset": 17
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 2,
                    "column": 18,
                    "byte_offset": 25
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "forBin:",
            "kind": "method",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 9,
                    "column": 18,
                    "byte_offset": 197
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 9,
                    "column": 25,
                    "byte_offset": 204
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "aBin",
            "kind": "method",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 9,
                    "column": 26,
                    "byte_offset": 205
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 9,
                    "column": 30,
                    "byte_offset": 209
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "aTotes",
            "kind": "method",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 9,
                    "column": 38,
                    "byte_offset": 217
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 9,
                    "column": 44,
                    "byte_offset": 223
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "setBin:",
            "kind": "method",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 17,
                    "column": 12,
                    "byte_offset": 334
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 17,
                    "column": 19,
                    "byte_offset": 341
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "aBin",
            "kind": "method",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 17,
                    "column": 20,
                    "byte_offset": 342
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 17,
                    "column": 24,
                    "byte_offset": 346
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "aTotes",
            "kind": "method",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 17,
                    "column": 32,
                    "byte_offset": 354
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 17,
                    "column": 38,
                    "byte_offset": 360
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "pickNext",
            "kind": "method",
            "range": {
                "start": {
                    "file": "PickRun.st",
                    "line": 24,
                    "column": 12,
                    "byte_offset": 460
                },
                "end": {
                    "file": "PickRun.st",
                    "line": 24,
                    "column": 20,
                    "byte_offset": 468
                }
            },
            "visibility": "unknown"
        }
    ]
}

symbols reports the class as class, and each method under its own selector — forBin:, setBin:, pickNext — as method; it also lists aBin and aTotes for the two keyword methods, each tagged method rather than a parameter kind, and reports only the first keyword of each two-part selector, so totes: never appears.

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

← SCSS/SassSnakemake →