Skip to main content
Glama
infinitepi-io

Bookmark Manager MCP

Add Bookmark

add

Save web links to the Bookmark Manager MCP by providing a title, URL, and optional category for organized storage and retrieval.

Instructions

Add a new bookmark

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesBookmark title
urlYesBookmark URL
categoryNoBookmark category (default: general)

Implementation Reference

  • The handler function for the 'add' tool. It creates a bookmark object from the input parameters, adds it to the bookmarks array, persists it via saveBookmarks(), and returns a text response confirming the bookmark was added.
    async ({ title, url, category = 'general' }) => {
      const bookmark = { title, url, category }
      bookmarks.push(bookmark)
      await saveBookmarks(bookmarks)
    
      return {
        content: [{
          type: 'text',
          text: `Bookmark added: ${title} - ${url} (category: ${category})`
        }]
      }
    }
  • The input schema for the 'add' tool defined using Zod. It validates that 'title' is a string, 'url' is a valid URL string, and 'category' is an optional string (defaults to 'general').
    inputSchema: {
      title: z.string().describe('Bookmark title'),
      url: z.string().url().describe('Bookmark URL'),
      category: z.string().optional().describe('Bookmark category (default: general)')
    }
  • src/index.ts:40-62 (registration)
    Registration of the 'add' tool with the MCP server using server.registerTool(). Includes the tool name, metadata (title, description), input schema, and handler function.
    server.registerTool('add',
      {
        title: 'Add Bookmark',
        description: 'Add a new bookmark',
        inputSchema: {
          title: z.string().describe('Bookmark title'),
          url: z.string().url().describe('Bookmark URL'),
          category: z.string().optional().describe('Bookmark category (default: general)')
        }
      },
      async ({ title, url, category = 'general' }) => {
        const bookmark = { title, url, category }
        bookmarks.push(bookmark)
        await saveBookmarks(bookmarks)
    
        return {
          content: [{
            type: 'text',
            text: `Bookmark added: ${title} - ${url} (category: ${category})`
          }]
        }
      }
    )
  • Helper function 'saveBookmarks' used by the 'add' tool handler to persist the bookmarks array to a JSON file.
    async function saveBookmarks (bookmarksToSave: Bookmark[]): Promise<void> {
      let fileHandle
      try {
        fileHandle = await open(bookMarkFileName, 'w')
        await fileHandle.writeFile(JSON.stringify(bookmarksToSave, null, 2))
      } catch (error) {
        throw new Error(`Failed to save bookmarks: ${error instanceof Error ? error.message : 'Unknown error'}`)
      } finally {
        if (fileHandle) {
          await fileHandle.close()
        }
      }
    }
  • TypeScript type definition for Bookmark, defining the structure with title (string), url (string), and category (string) fields.
    type Bookmark = {
      title: string,
      url: string,
      category: string
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Add a new bookmark' implies a write/mutation operation, but doesn't disclose any behavioral traits: no information about permissions required, whether duplicates are allowed, what happens on failure, rate limits, or what the response contains. The description states what the tool does but not how it 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 maximally concise at just four words ('Add a new bookmark'). Every word earns its place: 'Add' specifies the action, 'new' clarifies it's creation rather than update, and 'bookmark' identifies the resource. No wasted words or unnecessary elaboration.

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?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after adding (success/failure indicators), what permissions are needed, or how the tool integrates with the sibling 'list' tool. The description covers the basic purpose but leaves critical behavioral and contextual gaps unaddressed.

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 schema already fully documents all three parameters (title, url, category). The description adds no parameter information beyond what's in the schema - it doesn't explain relationships between parameters, provide examples, or add context about parameter usage. This meets the baseline for high schema coverage.

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 'Add a new bookmark' clearly states the verb ('Add') and resource ('bookmark'), making the purpose immediately understandable. It distinguishes from the sibling 'list' tool by specifying a creation action rather than retrieval. However, it doesn't specify what system or context the bookmark is being added to, which prevents a perfect score.

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. With a sibling tool named 'list', there's an obvious complementary relationship (create vs. retrieve), but the description doesn't mention this or provide any context about appropriate usage scenarios. No prerequisites, limitations, or exclusions are mentioned.

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/infinitepi-io/bookmark-manager-mcp'

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