Skip to main content
Glama
mumez

smalltalk-validator-mcp-server

by mumez

smalltalk-validator-mcp-server

A simple MCP server for validating and linting Tonel formatted Smalltalk source code using tree-sitter-tonel-smalltalk.

  • The purpose is that we would like to validate and lint AI-generated tonel files and Smalltalk method definitions before loading them into a real Smalltalk environment.

Tools

Validation Tools

validate_tonel_smalltalk_from_file(file_path, options)

  • Validate Tonel formatted Smalltalk source code from a file

validate_tonel_smalltalk(file_content, options)

  • Validate Tonel formatted Smalltalk source code from content string

validate_smalltalk_method_body(method_body_content)

  • Validate a Smalltalk method body for syntax correctness

Validation Options

without-method-body: true
    if true, it only validates tonel structure only (mainly for testing)

Linting Tools

lint_tonel_smalltalk_from_file(file_path)

  • Lint Tonel formatted Smalltalk source code from a file

lint_tonel_smalltalk(file_content)

  • Lint Tonel formatted Smalltalk source code from content string

See docs/lint-checks.md for the full list of checks.

Related MCP server: code-analyze-mcp

Installation

Quick install (uvx)

Run directly without cloning:

uvx --from git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main smalltalk-validator-mcp-server

Development setup (git clone)

git clone https://github.com/mumez/smalltalk-validator-mcp-server.git
cd smalltalk-validator-mcp-server
uv sync

Usage

Running the MCP Server

  • Using uvx (recommended for quick run):

uvx --from git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main smalltalk-validator-mcp-server
  • From a cloned repo:

uv run smalltalk-validator-mcp-server

Configuration Examples

Cursor Configuration

Add to your .cursor/settings.json:

{
  "mcpServers": {
    "smalltalk-validator": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main",
        "smalltalk-validator-mcp-server"
      ]
    }
  }
}

If you prefer using a local clone, use this instead:

{
  "mcpServers": {
    "smalltalk-validator": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/smalltalk-validator-mcp-server",
        "run",
        "smalltalk-validator-mcp-server"
      ]
    }
  }
}

Claude Code Configuration

Add to your Claude Code settings:

claude mcp add smalltalk-validator -- uvx --from git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main smalltalk-validator-mcp-server

Using a local clone instead:

claude mcp add smalltalk-validator -- uv --directory /path/to/smalltalk-validator-mcp-server run smalltalk-validator-mcp-server

Tool Usage Examples

Validate Tonel file from filesystem

# Validate a complete Tonel file with method bodies
validate_tonel_smalltalk_from_file("/path/to/MyClass.st")

# Validate only Tonel structure (without method body validation)
validate_tonel_smalltalk_from_file("/path/to/MyClass.st", {"without-method-body": true})

Validate Tonel content directly

tonel_content = """
Class {
    #name : #MyClass,
    #superclass : #Object,
    #category : #'My-Package'
}

{ #category : #accessing }
MyClass >> getValue [
    ^ 42
]
"""

validate_tonel_smalltalk(tonel_content)

Validate Smalltalk method body

method_body = "^ self name asUppercase"
validate_smalltalk_method_body(method_body)

Lint Tonel file from filesystem

# Lint a Tonel file for best practices and style issues
result = lint_tonel_smalltalk_from_file("/path/to/MyClass.st")

# Example result:
# {
#   "success": true,
#   "file_path": "/path/to/MyClass.st",
#   "issue_list": [
#     {
#       "severity": "warning",
#       "message": "Method 'longMethod' long: 18 lines (recommended: 15)",
#       "class_name": "MyClass",
#       "selector": "longMethod",
#       "is_class_method": false
#     }
#   ],
#   "issues_count": 1,
#   "warnings_count": 0,
#   "errors_count": 0
# }

Lint Tonel content directly

tonel_content = """
Class {
    #name : #MyClass,
    #superclass : #Object,
    #instVars : [
        'name',
        'age'
    ],
    #category : #'My-Package'
}

{ #category : #accessing }
MyClass >> getName [
    ^ name
]
"""

result = lint_tonel_smalltalk(tonel_content)

Development

# Install dependencies
uv sync

# Run tests
uv run pytest

# Lint and format
uv run ruff check
uv run ruff format

# Install pre-commit hooks
uv run pre-commit install

Available Tools

5 tools
lint_tonel_smalltalkLint Tonel Smalltalk ContentA
Read-onlyIdempotent

Lint Tonel formatted Smalltalk source code from content string.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_contentYesThe Tonel file content as a string

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds the input source (content string) but no additional behavioral context such as what linting checks, whether diagnostics are returned, or any side effects. It does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that clearly states the tool's purpose without any extra words or fluff, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with a rich schema and supportive annotations, but the description lacks explicit disambiguation from the validate_* siblings and does not explain what "lint" entails beyond the verb. It adequately handles the input format but leaves some contextual gaps for an agent choosing among siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage for the single parameter file_content, which is described as "The Tonel file content as a string." The description merely repeats the notion of "content string" without adding any semantic value beyond the schema, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb "Lint" with a clear resource ("Tonel formatted Smalltalk source code") and scope ("from content string"), which distinctly identifies the tool's function and differentiates it from the sibling tool lint_tonel_smalltalk_from_file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Use is implied by the phrase "from content string," suggesting this tool is for content strings rather than files. However, the description provides no explicit guidance on when to prefer this tool over lint_tonel_smalltalk_from_file or the validate_* tools, leaving the decision to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lint_tonel_smalltalk_from_fileLint Tonel Smalltalk FileA
Read-onlyIdempotent

Lint Tonel formatted Smalltalk source code from a file.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the Tonel file to lint

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds no additional behavioral context beyond the literal meaning of 'lint', but it does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear, front-loaded sentence with no wasted words. It effectively communicates the core action and target.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter tool with a rich annotation set and an output schema, the description is adequate. It could briefly explain what 'lint' returns or when to prefer linting over validating, but the minimal tool shape keeps the gap small.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the file_path parameter is already described in the schema. The description does not add extra semantics such as file format expectations or path resolution behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Lint') and the resource ('Tonel formatted Smalltalk source code from a file'). The 'from a file' qualifier distinguishes it from siblings like lint_tonel_smalltalk and validates the file-input scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives such as validate_tonel_smalltalk_from_file or lint_tonel_smalltalk. There is no mention of prerequisites, exclusions, or preferred scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

validate_smalltalk_method_bodyValidate Smalltalk Method BodyA
Read-onlyIdempotent

Validate a Smalltalk method body for syntax correctness.

ParametersJSON Schema
NameRequiredDescriptionDefault
method_body_contentYesThe Smalltalk method body content as a string

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds little beyond annotations: it states validation for syntax correctness, aligning with readOnlyHint and idempotentHint. It does not detail error reporting or side effects, but annotations already cover safety; description adds minimal value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence with no wasted words, and the tool's core purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity, one parameter, and rich annotations, the description is adequate but could mention what constitutes a 'method body' (e.g., without method signature) or what validation errors look like, but not required due to output schema presence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage (the only parameter has a description), so the baseline is 3. The description does not add extra meaning beyond 'method body content as a string', but schema is sufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool validates a Smalltalk method body for syntax correctness, which is a specific verb and resource. It distinguishes from sibling tools that validate/lint entire Tonel files, though it doesn't explicitly differentiate from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for validating a method body snippet, but does not explicitly say when to use it versus validating entire files. It lacks exclusions or alternative suggestions, though the context is clear enough for a simple tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

validate_tonel_smalltalkValidate Tonel Smalltalk ContentA
Read-onlyIdempotent

Validate Tonel formatted Smalltalk source code from content string.

ParametersJSON Schema
NameRequiredDescriptionDefault
optionsNoOptional validation options - without-method-body: If true, only validates tonel structure
file_contentYesThe Tonel file content as a string

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds no behavioral detail beyond what annotations already provide (readOnlyHint=true, idempotentHint=true, destructiveHint=false). It does not mention error handling, return value format, or what validations are performed, so the description contributes little extra transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence: 'Validate Tonel formatted Smalltalk source code from content string.' It is concise, clear, and contains no wasteful wording, ideal for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of annotations, a complete input schema, and an output schema, the description sufficiently conveys the core functionality and input mode. It lacks explicit usage alternatives, but the overall information is adequate for selecting and invoking the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema thoroughly documents both parameters (file_content and options) with descriptions, achieving 100% coverage. The description does not add additional parameter semantics beyond restating the content string aspect, so a baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (validate) and the specific resource (Tonel formatted Smalltalk source code) and input source (content string), distinguishing it from file-based or linting siblings like validate_tonel_smalltalk_from_file and lint_tonel_smalltalk.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for content strings, but does not explicitly state when to use this tool versus alternatives (e.g., the _from_file sibling). No when-not-to-use or alternative names are given, leaving the guidance ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

validate_tonel_smalltalk_from_fileValidate Tonel Smalltalk FileA
Read-onlyIdempotent

Validate Tonel formatted Smalltalk source code from a file.

ParametersJSON Schema
NameRequiredDescriptionDefault
optionsNoOptional validation options - without-method-body: If true, only validates tonel structure
file_pathYesPath to the Tonel file to validate

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true and destructiveHint=false, so the description does not need to repeat safety. It adds crucial context about the 'without-method-body' option, explaining that it only validates tonel structure, which is not evident from annotations. This goes beyond the schema by giving the behavioral condition under which the tool is less thorough. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is neither too short nor too verbose. It provides the essential information without waste. It is well-structured for a simple tool, and every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has a clear schema, an output schema, and good annotations, the description is adequate. It could mention that it returns validation results, but the output schema likely covers that. There are no other complexities that require more detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and both parameters are described in the schema. The `options` description includes the specific 'without-method-body' flag, which is helpful. The description text itself does not add further parameter info, but the schema is already rich, so a baseline of 3 plus the extra detail in the schema justifies a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description is precise: it says 'Validate Tonel formatted Smalltalk source code from a file.' This clearly states the action (validate), the resource (Tonel formatted Smalltalk source code), and the source (from a file). It also distinguishes it from siblings like validate_tonel_smalltalk (which likely takes a string) and lint_tonel_smalltalk (which lints rather than validates).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for validating a file, which is clear. It does not explicitly say when to use this vs alternatives, but the 'from_file' suffix and the sibling names make it obvious. There is no explicit exclusion or alternative guidance, but the context is sufficient. Could be improved with a phrase like 'use this when the source is a file'; however, it is otherwise clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv1.4.3
    • First observedlint_tonel_smalltalk
    • First observedlint_tonel_smalltalk_from_file
    • First observedvalidate_smalltalk_method_body
    • First observedvalidate_tonel_smalltalk
    • First observedvalidate_tonel_smalltalk_from_file

TDQS

A3.9/5.0

Scored across 5 tools

Disambiguation3/5

The content/file distinction is clear, and validate_smalltalk_method_body is genuinely distinct, but lint vs validate pairs are highly similar in purpose and may cause an agent to select the wrong one without deeper semantics. Descriptions help only slightly because they don't define the exact boundary between linting and validating.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern with an optional _from_file suffix. The naming is predictable across content-string and file-based variants, and validate_smalltalk_method_body fits the same style despite targeting a different input type.

Tool Count5/5

Five tools is a well-scoped number for a focused Smalltalk source validator, covering both linting and validating across content strings and files, plus method body validation. No tool feels unnecessary, and the set is compact rather than bloated.

Completeness4/5

The core validation and linting workflows are covered for Tonel source code from both content strings and files, along with direct method-body validation. Minor gaps exist in the absence of batch processing, formatting, or a way to validate method bodies from files, but these are workable rather than blocking.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mumez/smalltalk-validator-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server