Skip to main content
Glama

get contents by user

Retrieve content published by a specific TabNews user, with options to filter by page, quantity, and sorting strategy.

Instructions

get contents by user from tabnews api

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesThe username to get the contents
pageNoThe page number to get
per_pageNoThe number of contents per page
strategyNoThe strategy to get the contents

Implementation Reference

  • Handler function that executes the tool logic: calls the getContentsByUser API service with provided parameters, formats the result as a JSON text response, and handles errors.
    handler: async (params: GetContentByUserParams): Promise<McpResponse> => {
      try {
        const result = await getContentsByUser({
          username: params.username,
          page: params.page,
          per_page: params.per_page,
          strategy: params.strategy,
        });
    
        const content: McpTextContent = {
          type: "text",
          text: `Contents:\n\n${JSON.stringify(result, null, 2)}`,
        };
    
        return {
          content: [content],
        };
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Failed to get contents by user: ${error.message}`);
        } else {
          throw new Error("Failed to get contents by user");
        }
      }
    },
  • Zod-based input schema definition for the tool parameters: username (required), page, per_page, strategy (optional).
    parameters: {
      username: z.string().describe("The username to get the contents"),
      page: z.number().optional().describe("The page number to get"),
      per_page: z.number().optional().describe("The number of contents per page"),
      strategy: z
        .enum(["relevant", "new", "old"])
        .optional()
        .describe("The strategy to get the contents"),
    },
  • src/index.ts:38-43 (registration)
    Registration of the tool on the MCP server instance using the tool object's properties.
    server.tool(
      getContentsByUserTool.name,
      getContentsByUserTool.description,
      getContentsByUserTool.parameters,
      getContentsByUserTool.handler
    );
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. It states this is a 'get' operation but doesn't clarify whether it's read-only, whether it requires authentication, what rate limits apply, what format the contents are returned in, or whether pagination is handled. For a content retrieval tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function. There's no wasted verbiage or unnecessary elaboration. However, it could be slightly more structured by front-loading key differentiators, but it's appropriately concise for its purpose.

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 tool with 4 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'contents' means in this context, what the return format looks like, whether authentication is required, or how pagination works. The description should provide more context to compensate for the lack of structured metadata.

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%, meaning all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema (username, page, per_page, strategy). With complete schema coverage, the baseline score of 3 is appropriate since the description doesn't need to compensate for gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool retrieves contents by user from the TabNews API, which is a clear verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'get content' or 'get contents', which appear to be similar content retrieval tools. The purpose is understandable but lacks differentiation from alternatives.

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 like 'get content' or 'get contents'. There's no mention of prerequisites, constraints, or comparative use cases. The agent must infer usage from the tool name alone, which is insufficient for optimal selection.

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/renant/mcp-tabnews'

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