Skip to main content
Glama

Get Package Source

get_package_source
Read-onlyIdempotent

Browse a ZK-Kit package's source: get the full directory tree or read any file's content, such as source code, type definitions, or tests.

Instructions

Browse source code of a ZK-Kit package. Without filePath, returns the full directory tree. With filePath, returns the file content. Use this to read source code, type definitions, tests, or any file in a package.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
nameYesPackage name (e.g., '@zk-kit/lean-imt', 'lean-imt')
filePathNoRelative path to a file within the package (e.g., 'src/index.ts')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description's real contribution is the dual-mode return behavior (tree vs. file content), which is genuinely useful. However it says nothing about failure modes for a missing package or path, or how large a tree response can be, so the added value is real but bounded.

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 short sentences, front-loaded with the verb and resource, then the mode switch, then the use case. Nothing is redundant or padded.

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 two-parameter read-only tool with no output schema, the description covers purpose, mode-dependent returns, and intended use, which is close to sufficient. It leaves minor gaps around path resolution errors and response size, but nothing an agent would likely get wrong when calling it.

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 baseline would be 3, but the description adds meaning the schema does not: the presence or absence of filePath changes what the tool returns. That conditional semantics is exactly the kind of param guidance the schema cannot express.

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?

States a specific verb and resource ('browse source code of a ZK-Kit package') and makes the scope concrete. It implicitly separates itself from retrieval siblings like get_package_readme or get_package_api by being the generic file-level reader, though no sibling is named explicitly.

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?

Gives a clear use context: 'read source code, type definitions, tests, or any file in a package.' It does not name an alternative (e.g., 'for the README use get_package_readme') or state exclusions, so it stops short of full when/when-not guidance.

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