Skip to main content
Glama
funwarioisii

Cosense MCP Server

by funwarioisii

list_pages

Retrieve all pages from a Cosense project to access content and manage project structure for collaboration and documentation.

Instructions

List known cosense pages from my-project project on cosen.se

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the list_pages tool call. Returns a text content block with newline-separated list of page names from pre-fetched resources.
    case "list_pages": {
      return {
        content: [
          {
            type: "text",
            text: resources.map((resource) => resource.name).join("\n"),
          },
        ],
      };
    }
  • src/index.ts:111-119 (registration)
    Registration of the list_pages tool in the ListToolsRequestSchema handler, including name, description, and empty input schema.
    {
      name: "list_pages",
      description: `List known cosense pages from ${projectName} project on cosen.se`,
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Type definition for the ListPagesResponse returned by the listPages API helper.
    type ListPagesResponse = {
      limit: number;
      count: number;
      skip: number;
      projectName: string;
      pages: {
        title: string;
      }[];
    };
  • Helper function listPages that fetches the list of pages from the cosen.se API for the given project.
    async function listPages(
      projectName: string,
      sid?: string,
    ): Promise<ListPagesResponse> {
      const response = sid
        ? await fetch(`https://cosen.se/api/pages/${projectName}`, {
            headers: { Cookie: `connect.sid=${sid}` },
          })
        : await fetch(`https://cosen.se/api/pages/${projectName}`);
      const pages = await response.json();
      return pages as ListPagesResponse;
    }
  • Initialization of resources list using listPages helper, mapping pages to MCP resource format for use in tool handler and resource listing.
    const resources = await listPages(projectName, cosenseSid).then((pages) =>
      pages.pages.map((page) => ({
        uri: `cosense:///${page.title}`,
        mimeType: "text/plain",
        name: page.title,
        description: `A text page: ${page.title}`,
      })),
    );
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. It mentions 'List known cosense pages' which implies a read-only operation, but doesn't specify whether this requires authentication, what format the results come in, if there's pagination, or any rate limits. The description is minimal and lacks important behavioral 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 that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple listing tool and front-loads the core functionality.

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 simple listing tool with no parameters and no output schema, the description provides the basic purpose but lacks important context about what 'known' means, how results are formatted, or any behavioral constraints. Without annotations or output schema, more completeness would be helpful for an agent to use this tool effectively.

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 tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't mention parameters since none exist, earning a baseline score of 4 for this dimension.

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 clearly states the action ('List') and target resource ('known cosense pages from my-project project on cosen.se'), providing specific verb+resource combination. However, it doesn't explicitly differentiate from the sibling tool 'get_page' (which likely retrieves a single page), so it doesn't reach the highest 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 the sibling 'get_page' or any alternatives. It states what the tool does but offers no context about appropriate use cases, prerequisites, or exclusions.

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/funwarioisii/cosense-mcp-server'

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