Skip to main content
Glama
mumez
by mumez

get_method_source

Retrieve the source code of a specific method in a Pharo class by providing the class name and method selector.

Instructions

Get the source code of a specific method in a Pharo class.

Args:
    class_name: The name of the class
    selector: The method selector (message name)

Returns:
    The method source code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
class_nameYes
selectorYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the return value but doesn't cover error handling, permissions, rate limits, or whether the operation is read-only or has side effects. For a tool with zero annotation coverage, this leaves significant gaps.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded, with the core purpose stated first followed by parameter and return details. It avoids unnecessary elaboration, though the structure could be slightly more streamlined.

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 moderate complexity, no annotations, and no output schema, the description is partially complete. It covers the purpose and parameters well but lacks behavioral context and output details, making it adequate but with clear gaps.

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

Parameters5/5

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

The description adds crucial meaning beyond the input schema, which has 0% coverage. It explains that 'class_name' refers to a Pharo class and 'selector' is the method selector (message name), clarifying the semantics of both parameters effectively.

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 specific action ('Get the source code') and target ('of a specific method in a Pharo class'), distinguishing it from siblings like get_class_definition or get_method_list. It precisely identifies the verb and resource without being tautological.

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?

No guidance is provided on when to use this tool versus alternatives like get_class_definition or get_method_list. The description implies usage for retrieving method source code but lacks explicit context, prerequisites, or exclusions.

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

Install Server

Other Tools

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/pharo-nc-mcp-server'

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