Skip to main content
Glama

slice

Retrieve a small component or symbol plus exact #Lstart-Lend source code before reading files or grepping, and optionally mark the matched component STALE for internal fixes.

Instructions

Step 1 (Slice + Code in One Shot): Retrieve a <2KB component/symbol slice AND exact #Lstart-Lend source code (set query='<function_or_helper>', include_code=true) BEFORE calling read_file or grep. Pass mark_stale=true when pulling code for an internal fix (no contract change) to mark the matched component STALE in one shot.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "slice"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoArtifact kind (COMPONENT, FLOW, INTERFACE, LAW, SCHEMA)
boardNoBoard name (default: lattice_core)
queryNoKeyword or AST function/class/_helper name query
stageNoStage identifier
schemaNoSchema or contract name
divisionNoOwner division alias
componentNoComponent scope ID
mark_staleNoTransition matched component(s) to STALE in one shot for internal code fixes (default: false)
include_rawNoInclude full raw records (default: false)
include_codeNoInline exact #Lstart-Lend source code blocks for matched functions/classes/helpers (default: false)
project_rootNoOptional repository root path (auto-discovered by board name or file paths if omitted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure itself. It reveals two important behaviors: include_code inlines exact #Lstart-Lend source blocks, and mark_stale transitions matched components to STALE in one shot. It does not cover permissions, reversibility of the STALE transition, rate limits, errors, or whether the default operation is read-only.

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?

It is front-loaded with the core action and uses only two sentences with no obvious filler. The nested parentheticals and repeated 'in one shot' make it slightly dense, but every clause appears to serve workflow routing or parameter usage.

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 description gives enough to attempt the main slice-plus-code call and explains the mark_stale side effect. However, for an 11-parameter tool with no annotations and no output schema, it omits return shape, permissions, errors, and most routing context for the scoping parameters, leaving notable gaps.

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 the schema already defines all 11 parameters and the baseline is 3. The description adds value beyond the schema by pairing query='<function_or_helper>' with include_code=true and by tying mark_stale=true to internal fixes with no contract change. It still does not explain the scoping roles of board, kind, stage, schema, division, or component, but those remain documented in the schema.

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?

It states a specific verb and resource: retrieve a <2KB component/symbol slice plus exact #Lstart-Lend source code. It also distinguishes the action from read_file and grep, so the agent can identify what this tool is for without opening the schema.

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 gives clear routing: use this BEFORE calling read_file or grep, and pass mark_stale=true only for internal fixes with no contract change. It lacks broader when-not guidance for the non-mark_stale path, but the key alternative is explicit.

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