Skip to main content
Glama
kazuph
by kazuph

pocket_mark_as_read

Mark a Pocket article as read (archived) by providing its item ID, streamlining your saved article management and keeping your Pocket list organized.

Instructions

Marks a specific Pocket article as read (archived) using its item ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYes

Implementation Reference

  • pocket.ts:63-87 (handler)
    Core implementation of the tool: sends a POST request to Pocket API to archive (mark as read) the specified item ID.
    export async function markAsRead(config: PocketConfig, itemId: string) {
    	const response = await fetch("https://getpocket.com/v3/send", {
    		method: "POST",
    		headers: {
    			"Content-Type": "application/json; charset=UTF-8",
    			"X-Accept": "application/json",
    		},
    		body: JSON.stringify({
    			consumer_key: config.consumerKey,
    			access_token: config.accessToken,
    			actions: [
    				{
    					action: "archive",
    					item_id: itemId,
    				},
    			],
    		}),
    	});
    
    	if (!response.ok) {
    		throw new Error(`Failed to mark article as read: ${response.statusText}`);
    	}
    
    	return true;
    }
  • MCP tool dispatch handler: validates input, calls the markAsRead function, and formats the response.
    case "pocket_mark_as_read": {
    	if (!config.pocket) {
    		throw new Error("Pocket API configuration is not available");
    	}
    
    	const parsed = MarkAsReadSchema.safeParse(args);
    	if (!parsed.success) {
    		throw new Error(
    			`Invalid arguments for pocket_mark_as_read: ${parsed.error}`,
    		);
    	}
    
    	try {
    		await markAsRead(config.pocket, parsed.data.itemId);
    		return {
    			content: [
    				{
    					type: "text",
    					text: `Successfully marked article ${parsed.data.itemId} as read`,
    				},
    			],
    		};
    	} catch (error) {
    		const errorMessage =
    			error instanceof Error ? error.message : String(error);
    		return {
    			content: [
    				{
    					type: "text",
    					text: `Pocket API Error: ${errorMessage}`,
    				},
    			],
    			isError: true,
    		};
    	}
    }
  • Zod schema for validating the tool input: requires an itemId string.
    const MarkAsReadSchema = z.object({
    	itemId: z.string(),
    });
  • index.ts:68-73 (registration)
    Tool registration in the listTools response, including name, description, and input schema.
    {
    	name: "pocket_mark_as_read",
    	description:
    		"Marks a specific Pocket article as read (archived) using its item ID.",
    	inputSchema: zodToJsonSchema(MarkAsReadSchema) as ToolInput,
    },
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. While it indicates this is a mutation operation ('marks as read'), it doesn't specify whether this requires authentication, what happens to the article after archival, if the action is reversible, or any rate limits. The description provides minimal behavioral context beyond the basic action.

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 communicates the core purpose without any unnecessary words. It's appropriately sized for a single-parameter tool and front-loads the essential information.

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?

For a mutation tool with no annotations and no output schema, the description provides basic purpose but lacks important context about authentication requirements, error conditions, return values, or what 'archived' means operationally. It's minimally adequate but has clear gaps for a tool that modifies data.

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?

With 0% schema description coverage and only one parameter, the description adds significant value by explaining that 'itemId' refers to a 'Pocket article' identifier. This clarifies what the parameter represents beyond just being a string, though it doesn't provide format details or examples.

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 specific action ('marks as read'), the resource ('Pocket article'), and the mechanism ('using its item ID'). It distinguishes this tool from its sibling 'pocket_get_articles' by specifying it performs an archival action rather than retrieval.

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 context by mentioning 'item ID', suggesting this tool should be used when you have a specific article ID from Pocket. However, it doesn't explicitly state when to use this vs. alternatives or provide any exclusion criteria.

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

Related 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/kazuph/mcp-pocket'

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