Skip to main content
Glama
108yen
by 108yen

Get Categories

getCategories

Retrieve all available categories from the memo-mcp server to organize and access stored memos efficiently.

Instructions

Get all categories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoriesYes

Implementation Reference

  • Core handler function that reads the database and returns all categories. This is the primary implementation logic for the getCategories tool.
    export const getCategories = async (): Promise<Category[]> => {
      await db.read()
      return db.data.categories
    }
  • Zod schema defining the structure of a Category, used for input/output validation in the getCategories tool (output: array of categories).
    export const CategorySchema = z.object({
      createdAt: z.string().datetime(),
      id: z.string(),
      name: z.string().min(1),
      updatedAt: z.string().datetime(),
    })
  • Registers the 'getCategories' tool with the MCP server, providing schema and a thin wrapper handler that calls the core repository function.
    server.registerTool(
      "getCategories",
      {
        description: "Get all categories",
        inputSchema: {},
        outputSchema: { categories: z.array(CategorySchema) },
        title: "Get Categories",
      },
      async () => {
        const categories = await getCategories()
        return {
          content: [{ text: JSON.stringify(categories), type: "text" }],
          structuredContent: { categories },
        }
      },
    )
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. 'Get all categories' implies a read operation but doesn't specify whether this returns a list, array, or object; whether it's paginated; or what happens if no categories exist. For a tool with zero annotation coverage, this is insufficient context.

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 with zero waste. It's front-loaded with the core action and resource, making it immediately scannable and appropriately sized for a simple tool.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, output schema exists), the description is reasonably complete for its purpose. However, it lacks behavioral details (e.g., return format, error cases) that would be helpful despite the output schema, and doesn't differentiate from siblings, leaving minor gaps.

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 no parameter documentation is needed. The description appropriately doesn't mention parameters, earning a high baseline score. However, it doesn't explicitly state 'no parameters required,' which would make it perfect.

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 'Get all categories' clearly states the verb ('Get') and resource ('categories'), making the purpose immediately understandable. However, it doesn't distinguish this from sibling tools like 'getCategory' (singular) or explain the scope difference, 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 like 'getCategory' (for a specific category) or 'searchMemos' (which might involve categories). There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage from tool names alone.

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/108yen/memo-mcp'

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