Skip to main content
Glama

ait_slice_context

Returns a token-efficient structural slice of one known Python symbol—source, signature, docstring, variables, calls, and callers—so you can inspect its implementation without reading the whole file.

Instructions

Return a token-efficient structural slice of exactly one symbol: its source text, signature, docstring, variable table, outgoing calls, callers and optionally the bodies of its callees. USE WHEN: you know the symbol name and need its implementation without reading the whole file. DO NOT USE: for whole-file or repository review (use ait_review), or when the symbol name is unknown — locate it first.

Input Schema

NameRequiredDescriptionDefault
depthNoCall-graph hops to expand (0 = signature only, 3 = maximum). Out-of-range values are rejected, not clamped.
file_pathYesExisting Python file that contains the symbol, e.g. src/ait/slicer.py.
symbol_nameYesFunction or class name; qualify it as Class.method when ambiguous, e.g. Engine.scan.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the payload shape and the optional callee-body expansion tied to depth, which reads as a pure read operation. Gaps remain: nothing about behavior when the symbol is not found, ambiguity resolution failure, or whether the slice can still be large on deep call graphs.

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?

Front-loaded with the verb and scope, then a compact USE WHEN / DO NOT USE pair; every clause (output contents, sibling routing, unknown-symbol precondition) earns its place with no filler.

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?

No output schema exists, so the enumeration of returned fields is essential and present, and all three parameters are documented in-schema. What is missing is error/edge behavior (missing symbol, nonexistent file) that an agent would want before calling.

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%, so baseline is 3, but the description adds real meaning: 'exactly one symbol' constrains symbol_name cardinality, and 'optionally the bodies of its callees' explains what depth actually expands. It does not restate the 0-3 range or the Class.method qualification, which the schema already covers.

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?

Specific verb+resource: 'Return a token-efficient structural slice of exactly one symbol', with the returned contents enumerated (source, signature, docstring, variable table, outgoing calls, callers, callee bodies). The 'exactly one symbol' scoping distinguishes it plainly from the whole-file sibling ait_review.

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

Usage Guidelines5/5

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

Explicit USE WHEN (symbol name known, need implementation without reading the file) and DO NOT USE (whole-file/repository review -> ait_review; unknown symbol -> locate it first). The alternative sibling is named with the condition that selects it, leaving little to inference.

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

Deploy Server

Other Tools