Skip to main content
Glama

get_pagerank

Read-onlyIdempotent

Rank files by architectural importance using PageRank on the import graph. Identify critical files for refactoring or analysis.

Instructions

File importance ranking via PageRank on the import graph. Shows most central/important files. Use to identify architecturally critical files. For combined health metrics use get_project_health instead. By default markdown files (.md/.mdx/.markdown/.qmd) are excluded — their cross-link patterns dominate the graph and bury real code. Pass include_markdown: true to keep them. Read-only. Returns JSON: [{ file, score }]. Set output_format: "toon" for lossless TOON encoding — cheaper LLM tokens on tabular payloads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default: 50)
include_markdownNoWhen true, include markdown notes (.md/.mdx/.markdown/.qmd) in the ranking. Default: false — they crowd out real code in top-N otherwise.
output_formatNoOutput format. "json" (default) returns JSON, "markdown" returns LLM-friendly fenced markdown (tool-specific), "toon" returns Token-Oriented Object Notation — 30-60% fewer tokens on tabular data, fully lossless.
Behavior5/5

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

Annotations already indicate read-only, non-destructive, idempotent, and closed world. The description adds that it returns JSON with file and score, mentions the TOON option for token efficiency, and details the markdown file exclusion behavior. No contradictions.

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?

The description is about 4 sentences, front-loaded with the core purpose. Each sentence adds distinct value: purpose, guidance, behavioral detail, and parameter clarifications. No redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite lacking an output schema, the description explains the return format. All parameters are well explained. The tool's complexity (3 optional params) is fully covered. Sibling tools are numerous but the description effectively differentiates via purpose and alternative reference.

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. The description adds context beyond schema: explains the default limit (50), why markdown files are excluded by default, and the token savings of TOON format. This enriches parameter understanding.

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 tool computes PageRank on the import graph to show file importance, identifying architecturally critical files. This is a specific verb and resource, and the mention of 'combined health metrics' for get_project_health distinguishes it from siblings.

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?

Explicitly states when to use ('identify architecturally critical files') and when to use an alternative ('For combined health metrics use get_project_health instead'). Also explains the default exclusion of markdown files and how to override it.

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/nikolai-vysotskyi/trace-mcp'

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