Skip to main content
Glama
yamatairiku-dev

Kintone Book Management MCP Tool

get-book-information

Retrieve book details from the Information Systems Department's Kintone database to access comprehensive book information for management purposes.

Instructions

Get book information in the Information Systems Department

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get-book-information' tool. It calls getAllBookRecods to fetch data, formats it using formatBookRecord, and returns the result as text content or an error message.
    async () => {
      try {
        const booksInfo = await getAllBookRecods();
    
        // booksInfoがnullや未定義の場合のチェック
        if (!booksInfo || !Array.isArray(booksInfo)) {
          throw new Error("書籍データの取得に失敗しました");
        }
    
        const formattedBooksInfo = booksInfo.map(formatBookRecord).join("\n");
    
        return {
          content: [
            {
              type: "text",
              text: formattedBooksInfo,
            },
          ],
        };
      } catch (error) {
        console.error("書籍情報の取得中にエラーが発生しました:", error);
    
        return {
          content: [
            {
              type: "text",
              text: "申し訳ございませんが、書籍情報の取得中にエラーが発生しました。しばらく時間をおいて再度お試しください。",
            },
          ],
        };
      }
    }
  • Type definitions for BookRecord (structure from Kintone) and KintoneResponse (array of BookRecord), used in apiClient.ts helpers for the tool.
    export interface BookRecord {
      publisher_input: {
        type: "SINGLE_LINE_TEXT";
        value: string;
      };
      memo_input: {
        type: "MULTI_LINE_TEXT";
        value: string;
      };
      description_input: {
        type: "MULTI_LINE_TEXT";
        value: string;
      };
      title_input: {
        type: "SINGLE_LINE_TEXT";
        value: string;
      };
      $id: {
        type: "__ID__";
        value: string;
      };
      [fieldCode: string]: any;
    }
    
    export type KintoneResponse = BookRecord[];
  • src/index.ts:14-22 (registration)
    Registration of the 'get-book-information' tool on the MCP server, including name, description, and empty input schema.
    server.tool(
      "get-book-information",
      "Get book information in the Information Systems Department",
      {
        type: "object",
        properties: {},
        required: [],
      },
  • Helper function to retrieve all book records from the Kintone database via REST API, called by the tool handler.
    export async function getAllBookRecods(): Promise<KintoneResponse> {
      try {
        const response = await client.record.getAllRecords<BookRecord>(params);
        return response;
      } catch (error) {
        console.error("Error fetching book records:", error);
        throw error;
      }
    }
  • Helper function to format a single BookRecord into a readable multi-line string, used by the tool handler.
    export function formatBookRecord(record: BookRecord): string {
      return [
        `Title: ${record.title_input.value || "Unknown"}`,
        `Description: ${record.description_input.value || "Unknown"}`,
        `Memo: ${record.memo_input.value || "Unknown"}`,
        `Publisher: ${record.publisher_input.value || "Unknown"}`,
        `Origin: ${KINTONE_BASE_URL}/k/${KINTONE_APP_ID}/show#record=${record["$id"].value || "No headline"}`,
        "---",
      ].join("\n");
    }
Behavior3/5

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

Annotations are empty, so the description carries the full burden. It implies a read operation ('Get'), suggesting it's likely non-destructive, but doesn't disclose behavioral traits like authentication needs, rate limits, or what happens if no data is found. It adds basic context (department scope) but lacks critical details for a tool with no annotation coverage.

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, straightforward sentence that efficiently states the tool's purpose and scope. It's appropriately sized and front-loaded, with no wasted words. However, it could be slightly more structured (e.g., separating purpose from context), but it's concise and clear.

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?

Given no annotations, no output schema, and a simple tool with 0 parameters, the description is incomplete. It lacks details on what 'book information' includes, how results are returned, or any behavioral context. For a tool with no structured data, the description should compensate more to be fully helpful.

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 parameters need documentation. The description doesn't add param info, which is acceptable here. Baseline is 4 for zero parameters, as the schema fully covers the absence of inputs.

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's purpose ('Get book information') and specifies the domain ('Information Systems Department'), which provides some context. However, it's vague about what 'book information' entails (e.g., metadata, availability, content) and doesn't differentiate from siblings (though none exist). It's not tautological but lacks specificity in verb+resource details.

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, such as scenarios, prerequisites, or alternatives. It mentions the department scope ('Information Systems Department'), but this is part of the purpose, not usage instructions. Without explicit when/when-not or context, it offers minimal guidance.

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/yamatairiku-dev/kintone-bookmanage-mcp-stdio'

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