Skip to main content
Glama
prtc
by prtc

list_libraries

Retrieve your personal paper libraries from NASA ADS, showing library names, descriptions, and paper counts for organized research management.

Instructions

List all your personal paper libraries/collections in ADS. Shows library names, descriptions, and paper counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_libraries' tool. Fetches and lists the user's personal paper libraries from the NASA ADS API.
    async def list_libraries() -> list[TextContent]:
        """List all user libraries."""
        try:
            response = requests.get(
                f"{ADS_API_BASE}/biblib/libraries",
                headers=HEADERS,
                timeout=30
            )
            response.raise_for_status()
            
            data = response.json()
            libraries = data.get("libraries", [])
            
            if not libraries:
                return [TextContent(
                    type="text",
                    text="No libraries found. Create one with the create_library tool!"
                )]
            
            lib_lines = ["Your ADS Libraries:\n"]
            for lib in libraries:
                lib_lines.append(
                    f"• {lib.get('name', 'Unnamed')} (ID: {lib.get('id', 'unknown')})\n"
                    f"  {lib.get('description', 'No description')}\n"
                    f"  Papers: {lib.get('num_documents', 0)} | "
                    f"{'Public' if lib.get('public') else 'Private'}\n"
                )
            
            return [TextContent(type="text", text="\n".join(lib_lines))]
        
        except Exception as e:
            logger.error(f"Error listing libraries: {e}")
            return [TextContent(
                type="text",
                text=f"Error listing libraries: {str(e)}"
            )]
  • Registers the 'list_libraries' tool in the MCP server's list_tools() method, including its name, description, and empty input schema (no parameters required).
    Tool(
        name="list_libraries",
        description=(
            "List all your personal paper libraries/collections in ADS. "
            "Shows library names, descriptions, and paper counts."
        ),
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • The input schema for the 'list_libraries' tool, which requires no input parameters.
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • Dispatch logic in the main call_tool handler that routes 'list_libraries' calls to the specific implementation function.
    elif name == "list_libraries":
        return await list_libraries()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does ('List all your personal paper libraries') and output details, but lacks critical behavioral traits: it doesn't specify if authentication is required, mention rate limits, describe pagination or sorting for large result sets, or clarify what 'your personal' means (e.g., user-specific vs. shared libraries). For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 a single, efficient sentence that front-loads the core action ('List all your personal paper libraries/collections in ADS') and adds valuable output details ('Shows library names, descriptions, and paper counts'). There is zero waste—every word contributes to understanding the tool's purpose and output.

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?

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and output format, which is sufficient for a simple list operation. However, without annotations or output schema, it should ideally mention authentication needs or behavioral constraints (e.g., is this a read-only, safe operation?). The description meets minimum viability but misses contextual details that would enhance agent understanding.

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?

The input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of inputs. The description adds no parameter information, which is appropriate here—it doesn't need to compensate for missing schema details. Baseline is 4 for 0 parameters, as the description correctly focuses on output semantics without redundant input explanations.

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?

The description clearly states the verb ('List') and resource ('personal paper libraries/collections in ADS'), with specific output details ('library names, descriptions, and paper counts'). It distinguishes from siblings like 'get_library_papers' (which retrieves papers within a library) by focusing on library metadata rather than contents. However, it doesn't explicitly contrast with all siblings (e.g., 'create_library' is clearly different, but differentiation from 'export_bibtex' or 'search_papers' is implied rather than stated).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication), compare it to similar tools like 'get_library_papers' for accessing library contents, or indicate scenarios where listing libraries is appropriate (e.g., before selecting one for operations). Usage is implied by the action but not explicitly defined.

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/prtc/nasa-ads-mcp'

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