Skip to main content
Glama

sharphy_extract_tokens

Extracts runtime tokens and types by loading target assemblies into an isolated collectible AssemblyLoadContext, enabling dynamic type inspection without file locks or host runtime pollution.

Instructions

Safely extracts runtime tokens and types by loading target assemblies inside an isolated collectible AssemblyLoadContext (isCollectible: true). Use this tool when dynamically inspecting types without locking files on disk or polluting the host runtime. Do NOT use for static disassembly without runtime loading (use 'sharphy_inspect_metadata'). Sandboxed read-only execution.

Input Schema

NameRequiredDescriptionDefault
assemblyPathYesPath to the target assembly

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/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 well: it discloses the isolation model (collectible ALC), the key side-effect guarantees (no file locking, no host-runtime pollution) and the safety profile ('sandboxed read-only execution'). It stops short of describing failure behavior — e.g. what happens on dependency resolution or bad-image load errors — which matters for a tool that must actually execute assembly loading.

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?

Three sentences, each doing distinct work: what it does, when to use it, and when not to. The mechanism and the primary benefit are front-loaded, and there is 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?

For a single-parameter read-only tool with no output schema, the description covers purpose, selection criteria, and safety well. The remaining gap is the return shape — 'tokens and types' is vague about what the agent actually receives (token values, type names, resolution results), which the absent output schema would otherwise have supplied.

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 description coverage is 100% for the single parameter 'assemblyPath', so the schema already documents it. The description adds no constraints beyond the schema — no notes on supported path forms, relative vs absolute paths, or whether the assembly's dependencies must be resolvable from that location. Baseline 3 applies.

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?

States a specific verb and resource ('extracts runtime tokens and types') plus the mechanism ('loading target assemblies inside an isolated collectible AssemblyLoadContext'), which is far more precise than the tool name alone. It also explicitly distinguishes itself from the static-analysis sibling 'sharphy_inspect_metadata'.

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?

Gives an explicit positive trigger ('use this tool when dynamically inspecting types without locking files on disk or polluting the host runtime') and an explicit exclusion with a named alternative ('Do NOT use for static disassembly... use sharphy_inspect_metadata'). The agent has everything needed to route between this tool and its closest sibling.

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