Skip to main content
Glama

build_communities_v1

Construct topic communities from paper-entity relationships using Leiden clustering. Specify level, resolution, and node frequency to customize communities for literature analysis.

Instructions

构建主题社区

从 Paper->Entity 关系构建共现图,使用 Leiden 算法聚类。

Args: level: 社区层级,"macro" 或 "micro" min_df: 节点至少出现在 N 篇 paper,默认 3 resolution: Leiden 分辨率参数,默认 1.0 max_nodes: 最大节点数,默认 20000 rebuild: 是否重建(清除同 level 旧结果),默认 False

Returns: 社区列表,每个包含 comm_id、大小和 top entities

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNomacro
min_dfNo
resolutionNo
max_nodesNo
rebuildNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description must disclose behavior. It explains the algorithm (Leiden), the rebuild parameter (clears old results for same level), and parameters affecting the process. However, it does not mention potential side effects, time costs, or data persistence beyond the rebuild parameter.

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 well-structured: a header sentence, a brief algorithmic overview, a parameter list with explanations, and a return description. Every sentence is informative and earns its place, with key information front-loaded.

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?

The description covers purpose, algorithm, parameters, and return format (with output schema also present). However, it lacks guidance on prerequisites (e.g., graph must be built first) or integration with sibling tools like rebuild_communities, leaving some context incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description fully explains all 5 parameters: level (macro/micro), min_df, resolution, max_nodes, and rebuild, including defaults. This adds significant meaning beyond the bare 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?

The description clearly states the purpose: constructing topic communities from Paper->Entity relationships using the Leiden algorithm. This is specific and distinct from sibling tools like summarize_community_v1 which operate on existing communities.

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

Usage Guidelines3/5

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

The description implies usage through parameter descriptions (e.g., rebuild option suggests managing multiple levels) but does not explicitly state when to use this tool versus alternatives. No exclusions or direct comparisons to siblings are provided.

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/h-lu/paperlib-mcp'

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