Skip to main content
Glama
prtc
by prtc

create_library

Organize astronomical papers into custom collections by topic, project, or reading status using the NASA ADS system.

Instructions

Create a new paper library/collection. Useful for organizing papers by topic, project, or reading status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the library (e.g., 'Stellar Populations Review')
descriptionNoDescription of the library
publicNoWhether the library should be public (default: false)

Implementation Reference

  • The main handler function that executes the create_library tool logic: POSTs to ADS API /biblib/libraries endpoint with name, description, public params, returns success message with new library ID or error.
    async def create_library(name: str, description: str = "", public: bool = False) -> list[TextContent]:
        """Create a new library."""
        try:
            payload = {
                "name": name,
                "description": description,
                "public": public
            }
            
            response = requests.post(
                f"{ADS_API_BASE}/biblib/libraries",
                headers=HEADERS,
                json=payload,
                timeout=30
            )
            response.raise_for_status()
            
            data = response.json()
            library_id = data.get("id")
            
            return [TextContent(
                type="text",
                text=f"✓ Created library '{name}'\nLibrary ID: {library_id}\n\nUse add_to_library to add papers to this library."
            )]
        
        except Exception as e:
            logger.error(f"Error creating library: {e}")
            return [TextContent(
                type="text",
                text=f"Error creating library: {str(e)}"
            )]
  • Pydantic/input schema defining the expected input parameters for the create_library tool.
    inputSchema={
        "type": "object",
        "properties": {
            "name": {
                "type": "string",
                "description": "Name for the library (e.g., 'Stellar Populations Review')",
            },
            "description": {
                "type": "string",
                "description": "Description of the library",
            },
            "public": {
                "type": "boolean",
                "description": "Whether the library should be public (default: false)",
                "default": False,
            },
        },
        "required": ["name"],
    },
  • Registration of the create_library tool in the list_tools() function, including name, description, and input schema.
    Tool(
        name="create_library",
        description=(
            "Create a new paper library/collection. "
            "Useful for organizing papers by topic, project, or reading status."
        ),
        inputSchema={
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "description": "Name for the library (e.g., 'Stellar Populations Review')",
                },
                "description": {
                    "type": "string",
                    "description": "Description of the library",
                },
                "public": {
                    "type": "boolean",
                    "description": "Whether the library should be public (default: false)",
                    "default": False,
                },
            },
            "required": ["name"],
        },
    ),
  • Dispatch logic in the main call_tool handler that routes 'create_library' calls to the implementation function with parsed arguments.
    elif name == "create_library":
        return await create_library(
            name=arguments["name"],
            description=arguments.get("description", ""),
            public=arguments.get("public", False)
        )
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it states the tool creates something (implying a write operation), it doesn't disclose critical behavioral traits such as whether this requires specific permissions, if libraries are permanent or deletable, rate limits, or what happens on success/failure. The description adds minimal value beyond the basic purpose.

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 appropriately sized and front-loaded: the first sentence states the core purpose, and the second adds useful context without redundancy. Every sentence earns its place by clarifying the tool's utility, making it efficient and easy to parse.

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

Completeness2/5

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

Given the complexity of a creation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., library ID, success confirmation), error conditions, or behavioral nuances like idempotency. For a mutation tool, this leaves significant gaps for an AI agent to operate effectively.

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%, so the input schema already documents all three parameters (name, description, public) with clear descriptions and defaults. The description adds no additional parameter semantics beyond what's in the schema, such as format constraints or examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Create') and resource ('new paper library/collection'), making the purpose immediately understandable. It distinguishes from siblings like 'list_libraries' (read) and 'add_to_library' (modify existing). However, it doesn't explicitly differentiate from potential overlapping tools like 'organize_papers' or 'manage_collections', which slightly reduces specificity.

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 provides implied usage context ('useful for organizing papers by topic, project, or reading status'), suggesting when this tool might be appropriate. However, it lacks explicit guidance on when to use this versus alternatives (e.g., 'list_libraries' for viewing, 'add_to_library' for modifying), and doesn't mention prerequisites like authentication or permissions.

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