Skip to main content
Glama
iijimam

RAGandLLM-MCP

by iijimam

RAG + 生成 AI であそぼう!の MCP サーバのコード

RAG + 生成AIであそぼう!のウェビナーで使用した MCP サーバー側コードです。

※ REST API 側のコードは https://github.com/Intersystems-jp/RAGandLLM-Asobo にあります。

※ 参考にしたページ:https://qiita.com/Maki-HamarukiLab/items/2f3230d5293beff2ca46

含まれるコンポーネント

ツール

この MCP サーバに含まれるツールは以下の通りです。

  • upload_file

    魚の画像ファイルをUploadすると、魚名と魚IDが返ります。

    応答JSON例

    {
      "FishID": "f025",
      "FishName": "シーバス"
    }
  • get_recipe

    レシピ生成を依頼できます。

    upload_file 実行時の応答とユーザの好みの情報や料理経験が入力情報で必要です。

    POST 要求の Body に指定している実際の JSON は以下の通りです。

    {
      "FishID": "f025",
      "FishName": "シーバス",
      "UserInput": "地元料理でフライパン1つで作れるレシピ"
    }
  • register_choka

    釣った魚の釣果を登録できます。

    upload_file で得られた魚名(FishName)と魚ID(FishID)を使用します。

    POST 要求の Body に指定している実際の JSON は以下の通りです。

    {
      "FishID": "f025",
      "FishName": "シーバス",
      "FishSize": "50",
      "FishCount": 2
    }

Related MCP server: Beeper MCP Note Server

Quickstart

Install

Claude Desktop の開発者用設定

  • On MacOS

    ~/Library/Application\ Support/Claude/claude_desktop_config.json

  • On Windows:

    %APPDATA%/Claude/claude_desktop_config.json

設定内容

Claude desktop の ファイル>設定>開発者 を開き「設定を編集」をクリックし設定用JSONに以下指定します。

"mcpServers": {
  "RAGandLLM-MCP": {
    "command": "uv",
    "args": [
      "--directory",
      "C:\\WorkSpace\\MCPTest\\RAGandLLM-MCP",
      "run",
      "RAGandLLM-MCP"
    ]
  }
}

Available Tools

3 tools
get_recipeC

ユーザプロンプトと前回取得した魚名、魚IDを元にレシピ生成

ParametersJSON Schema
NameRequiredDescriptionDefault
UserInputYesユーザのレシピに対する希望。例:夏バテ防止レシピ
FishIDYes魚の画像アップロード後に得られた魚ID
FishNameYes魚の画像アップロード後に得られた魚の名称

TDQS

C2.9/5.0
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 states the tool generates recipes but doesn't describe what that entails (e.g., format, length, whether it's AI-generated, if it includes cooking steps). It lacks information on permissions, rate limits, or error handling, leaving significant gaps for a tool that likely performs a complex operation.

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 in Japanese that directly states the tool's function and inputs. It's front-loaded with the core purpose and avoids unnecessary words, though it could be slightly more structured (e.g., separating purpose from input explanation).

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 recipe generation tool with 3 required parameters and no annotations or output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., text recipe, structured data), how recipes are generated, or any behavioral aspects like response format or limitations. The schema covers inputs well, but the overall context for using the tool is insufficient.

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%, so the schema already documents all three parameters thoroughly. The description adds minimal value beyond the schema by mentioning the parameters in context ('ユーザプロンプトと前回取得した魚名、魚IDを元に'), but doesn't provide additional syntax, format details, or usage examples that aren't already in the schema descriptions.

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 tool's purpose: 'レシピ生成' (recipe generation) based on user prompts and previously obtained fish information. It specifies the inputs (user prompt, fish name, fish ID) but doesn't distinguish itself from sibling tools like 'register_choka' or 'upload_file', which appear unrelated to recipe generation.

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. It doesn't mention prerequisites (e.g., needing fish identification first), exclusions, or how it relates to sibling tools. Usage is implied through the input parameters but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

register_chokaC

釣果登録が行えます

ParametersJSON Schema
NameRequiredDescriptionDefault
FishIDYesupload_fileの応答JSONにあるFishIDを使用する。upload_fileを事前に実行していいない場合はユーザによる指定が必要
FishNameYesupload_fileの応答JSONにあるFishNameを使用する。upload_fileを事前に実行していいない場合はユーザによる指定が必要
FishSizeYes釣果登録時、魚の体長をセンチメートルで指定する
FishCountYes釣果登録時、釣った魚の数を指定する。

TDQS

C2.6/5.0
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. It states the tool can register fishing results, implying a write/mutation operation, but doesn't cover aspects like whether it requires authentication, what happens on success/failure, if it's idempotent, or any rate limits. This is a significant gap for a tool that likely modifies data.

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 ('釣果登録が行えます'), which is appropriately concise. It front-loads the core action without unnecessary details. However, it could be slightly improved by integrating key usage hints from the schema, but it's not wasteful.

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 the tool has no annotations, no output schema, and involves mutation (registering data), the description is incomplete. It doesn't explain what the tool returns, error conditions, or behavioral traits like side effects. For a 4-parameter write tool, this lack of context makes it inadequate for safe and effective use by an AI agent.

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%, with all parameters well-documented in the input schema (e.g., FishID from upload_file, FishSize in centimeters). The description adds no additional meaning beyond the schema, so it meets the baseline of 3 where the schema handles parameter semantics adequately.

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 '釣果登録が行えます' translates to 'You can register fishing results,' which provides a basic verb+resource (register + fishing results). However, it's vague about what specifically is being registered (fish details from parameters) and doesn't distinguish from sibling tools like 'upload_file' or 'get_recipe.' It states the action but lacks specificity about scope or differentiation.

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 explicit guidance on when to use this tool versus alternatives is provided. The description doesn't mention prerequisites like needing to run 'upload_file' first, which is hinted at in the parameter descriptions but not in the tool description itself. There's no context on when-not-to-use or comparisons with siblings, leaving usage unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

upload_fileC

魚の画像を渡すと魚名が返ります。補足情報として魚IDも返ります。

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYesアップロードする魚画像ファイル名フルパス(例: c: emp ish.jpg)で指定します。応答はJSONで返送され、FishID、FishName、が返ります。

TDQS

C2.9/5.0
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 mentions that fish names and IDs are returned, but doesn't describe error handling, file format requirements, size limits, authentication needs, or rate limits. For a tool that processes images and returns data, this leaves significant behavioral gaps.

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 concise and front-loaded with the main purpose in the first sentence. The second sentence adds useful supplementary information about return values. Both sentences earn their place, though it could be slightly more structured (e.g., separating purpose from return details more clearly).

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 the tool's complexity (image processing and identification), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like error conditions, file requirements, or response format details beyond mentioning JSON. For a tool with no structured safety or output information, more context is needed.

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 schema description coverage is 100%, with the parameter 'filename' fully documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., no additional context about image formats or constraints). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but doesn't need to.

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 tool's purpose: '魚の画像を渡すと魚名が返ります' (when you pass a fish image, it returns the fish name). It specifies the verb (upload/process image) and resource (fish identification), though it doesn't explicitly differentiate from sibling tools like 'get_recipe' or 'register_choka'. The purpose is clear but lacks sibling differentiation.

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. It doesn't mention prerequisites, when not to use it, or how it differs from sibling tools like 'get_recipe' or 'register_choka'. The only implied usage is for fish image identification, but no explicit alternatives or context is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • Changedget_recipe4 fields changed
      • addedInput schema / properties / FishID
        Added value: +{
        +  "description": "魚の画像アップロード後に得られた魚ID",
        +  "type": "string"
        +}
      • removedInput schema / properties / FishInfo
        Removed value: -{
        -  "description": "魚の画像ファイルアップロード後に得られた魚情報",
        -  "type": "string"
        -}
      • changedInput schema / properties / FishName / description
        Previous value: -"魚の画像ファイルから得られた魚の名称"New value: +"魚の画像アップロード後に得られた魚の名称"
      • changedInput schema / required
        Previous value: -[
        -  "UserInput",
        -  "FishName",
        -  "FishInfo"
        -]New value: +[
        +  "UserInput",
        +  "FishID",
        +  "FishName"
        +]
    • Addedregister_choka
    • Changedupload_file1 field changed
      • changedInput schema / properties / filename / description
        Previous value: -"アップロードする魚画像ファイル名フルパス(例: c:\temp\fish.jpg)"New value: +"アップロードする魚画像ファイル名フルパス(例: c:\temp\fish.jpg)で指定します。応答はJSONで返送され、FishID、FishName、が返ります。"
  2. 2 tool updates
    • First observedget_recipe
    • First observedupload_file

TDQS

C2.9/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: get_recipe generates recipes, register_choka registers fishing catches, and upload_file identifies fish from images. There is no overlap in functionality, and an agent can easily tell them apart based on their unique operations.

Naming Consistency4/5

The tools follow a consistent verb_noun pattern (get_recipe, register_choka, upload_file), with all using snake_case. The minor deviation is that 'choka' is a domain-specific term (Japanese for fishing catch), but the naming structure remains predictable and readable throughout.

Tool Count3/5

With only 3 tools, the server feels thin for its apparent scope in RAG and LLM applications related to fishing and recipes. While each tool is distinct, the set lacks depth for comprehensive workflows, such as managing recipes or handling multiple fishing data operations, making it borderline for the domain.

Completeness2/5

There are significant gaps in the tool surface for a RAG/LLM server focused on fishing and recipes. Missing operations include updating or deleting recipes, querying fishing data, managing user profiles, or integrating with LLM models beyond basic generation. This incompleteness will likely cause agent failures in extended tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers