Skip to main content
Glama

write_note

Create and store text notes within the weather-focused MCP server for personal documentation and reference.

Instructions

Write a new note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesText content of the note

Implementation Reference

  • The handler in CallToolRequestSchema that executes the write_note logic by calling the FlomoClient.
    case "write_note": {
      const content = String(request.params.arguments?.content);
      if (!content) {
        throw new Error("Content is required");
      }
    
      const apiUrl = "https://flomoapp.com/iwh/MjY4NTU3NQ/b3a150f427dfaa7924b26f68539db56b/";
      const flomoClient = new FlomoClient({ apiUrl });
      const result = await flomoClient.writeNote({ content });
    
      return {
        content: [{
          type: "text",
          text: `Write note to flomo success: ${JSON.stringify(result)}`
        }]
      };
    }
  • The actual implementation of writeNote that interacts with the Flomo API via HTTPS.
    async writeNote({ content }: { content: string }) {
        if (!content) {
            throw new Error('Content is required');
        }
        const body = new URLSearchParams({ content }).toString();
        const url = new URL(this.apiUrl);
    
        const result = await new Promise<{ statusCode: number; data: string }>((resolve, reject) => {
            const req = https.request(
                {
                    hostname: url.hostname,
                    path: url.pathname + url.search,
                    method: 'POST',
                    rejectUnauthorized: false,
                    headers: {
                        'Content-Type': 'application/x-www-form-urlencoded',
                        'Content-Length': Buffer.byteLength(body),
                    },
                },
                (res) => {
                    const chunks: Buffer[] = [];
                    res.on('data', (chunk: Buffer) => chunks.push(chunk));
                    res.on('end', () =>
                        resolve({
                            statusCode: res.statusCode ?? 0,
                            data: Buffer.concat(chunks).toString('utf8'),
                        }),
                    );
                },
            );
            req.on('error', reject);
            req.write(body);
            req.end();
        });
    
        if (result.statusCode < 200 || result.statusCode >= 300) {
            let detail = `HTTP ${result.statusCode}`;
            try {
                const json = JSON.parse(result.data);
                if (json.message) detail += `: ${json.message}`;
                else if (json.error) detail += `: ${json.error}`;
            } catch {
                if (result.data) detail += `: ${result.data.slice(0, 200)}`;
            }
            throw new Error(`Failed to write note (${detail})`);
        }
        try {
            return JSON.parse(result.data);
        } catch {
            return { ok: true };
        }
    }
  • src/index.ts:169-182 (registration)
    The tool registration for write_note in the ListToolsRequestSchema handler.
    {
      name: "write_note",
      description: "Write a new note",
      inputSchema: {
        type: "object",
        properties: {
          content: {
            type: "string",
            description: "Text content of the note"
          }
        },
        required: ["content"]
      }
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails significantly. It does not explain persistence characteristics, storage location, whether the operation is idempotent, potential error conditions, or what constitutes a 'note' in this system.

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

Conciseness3/5

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

At three words, the description is extremely brief, but this borders on under-specification rather than efficient conciseness. It is front-loaded but fails to earn its place by providing actionable context beyond the tool name itself.

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?

Despite low parameter complexity (1 param) and good schema coverage, the description is inadequate for a write operation with no annotations and no output schema. It omits critical context about where notes are stored, retrieval mechanisms, and success/failure indicators.

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?

The input schema has 100% description coverage for the 'content' parameter. The description adds no parameter-specific guidance, but per scoring guidelines, the baseline is 3 when schema coverage is high (>80%) and the description does not need to compensate for coverage gaps.

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

Purpose2/5

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

The description 'Write a new note' essentially restates the tool name 'write_note' with minimal elaboration. While it correctly identifies the action and resource, it is tautological and fails to distinguish scope or behavior beyond the obvious.

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?

No guidance provided on when to use this tool versus alternatives, prerequisites for writing notes, or relationships to other operations (e.g., reading or deleting notes). The agent receives no context about the note lifecycle.

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/jspsmart/mcp-weather'

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