Skip to main content
Glama
d-kimuson

ESA MCP Server

by d-kimuson

get_search_query_document

Retrieve documentation for esa.io search queries to understand syntax, operators, and parameters for effective post searching.

Instructions

Retrieves comprehensive documentation about esa.io search queries. Provides detailed information about available query syntax, operators, and search parameters to effectively search through esa posts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that returns the esa.io search query documentation as a text content block.
    async () => {
      return {
        content: [
          {
            type: "text",
            text: searchQueryDocument,
          },
        ],
      }
    }
  • src/server.ts:21-35 (registration)
    Registration of the get_search_query_document tool with empty input schema and inline handler.
    server.tool(
      "get_search_query_document",
      "Retrieves comprehensive documentation about esa.io search queries. Provides detailed information about available query syntax, operators, and search parameters to effectively search through esa posts.",
      {},
      async () => {
        return {
          content: [
            {
              type: "text",
              text: searchQueryDocument,
            },
          ],
        }
      }
    )
  • Markdown documentation string for esa.io search queries, imported and returned by the tool handler.
    export const searchQueryDocument = /* markdown */ `---
    original-documents:
      - https://docs.esa.io/posts/104
    ---
    
    # 記事検索のオプション・仕様について
    
    ## 検索オプション
    
    検索に下記のオプションを使うことで、様々な角度から絞り込み検索をすることができます。
    
    使用例:
    
    \`\`\`
    category:日報
    \`\`\`
    
    \`\`\`
    created:>2023-07-05 @taea wip:false
    \`\`\`
    
    | 記法                                     | 説明                                                                                                                                                                               |
    | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | \`keyword\`                                | 記事名 or カテゴリ or 本文にkeywordを含むもの(表記の揺れを考慮した検索)                                                                                                            |
    | \`"keyword"\`                              | 記事名 or カテゴリ or 本文にkeywordを含むもの(語句の完全一致による検索)<br> [#220: ReleaseNotes/2017/07/12/""を使うと語句の完全一致による検索ができるようになりました](/posts/220) |
    | \`name:keyword\` または \`title:keyword\`    | 記事名にkeywordを含むもの                                                                                                                                                          |
    | \`full_name:keyword\`                      | "[カテゴリ名]/[記事名]" にkeywordを含むもの                                                                                                                                        |
    | \`number\`                                 | 記事ID(URL末尾の番号)                                                                                                                                                            |
    | \`wip:true または wip:false\`              | 記事の WIP or Shipped 状態                                                                                                                                                         |
    | \`kind:stock または kind:flow\`            | 記事のStock or Flow 状態 <br> [#31: release_note/2014/12/13/検索結果の絞り込み(Stock or Flow)](/posts/31)                                                                          |
    | \`category:keyword\`                       | カテゴリ名にkeywordを含むもの(部分一致)                                                                                                                                            |
    | \`in:keyword\`                             | カテゴリ名がkeywordから始まるもの(前方一致)                                                                                                                                        |
    | \`on:keyword\`                             | カテゴリ名がkeywordであるもの(完全一致)                                                                                                                                            |
    | \`body:keyword\`                           | 記事本文にkeywordを含むもの                                                                                                                                                        |
    | \`#tag1\` または \`tag:tag1\`                | tag1 タグが付いているもの(大文字小文字区別なし)                                                                                                                                    |
    | \`#tag1 case_sensitive:true\`              | tag1 タグが付いているもの(大文字小文字区別あり)                                                                                                                                    |
    | \`@screen_name\` または \`user:screen_name\` | 記事作成者のscreen_name                                                                                                                                                            |
    | \`updated_by:screen_name\`                 | 記事の最終更新者のscreen_name                                                                                                                                                      |
    | \`comment:keyword\`                        | コメント本文に keyword が含まれる記事                                                                                                                                              |
    | \`starred:true\` または \`starred:false\`    | 自分がStarしている記事                                                                                                                                                             |
    | \`watched:true\` または \`watched:false\`    | 自分がWatchしている記事                                                                                                                                                            |
    | \`watched_by:screen_name\`                 | 記事をwatchしているメンバーのscreen_name                                                                                                                                           |
    | \`sharing:true\` または \`sharing:false\`    | 記事の外部公開状態                                                                                                                                                                 |
    | \`stars:>3\`                               | Star数が3より大きい記事                                                                                                                                                            |
    | \`watches:>4\`                             | Watch数が4より大きい記事                                                                                                                                                           |
    | \`comments:>5\`                            | コメント数が5より大きい記事                                                                                                                                                        |
    | \`done:>=6\`                               | 完了したタスクが6以上の記事                                                                                                                                                        |
    | \`undone:>0\`                              | 未完了のタスクが0より大きい記事                                                                                                                                                    |
    | \`created:>2015-07-05\`                    | 2015-07-05以降に作成された記事                                                                                                                                                     |
    | \`updated:>2015-07\`                       | 2015-07-01以降に更新された記事                                                                                                                                                     |
    | \`keyword1 keyword2\`                      | AND検索(スペース区切り)                                                                                                                                                            |
    | \`keyword1 OR keyword2\`                   | OR検索                                                                                                                                                                             |
    | \`keyword1 \| keyword2\`                   | OR検索                                                                                                                                                                             |
    | \`-keyword\`                               | 否定検索                                                                                                                                                                           |
    
    ### 語句の結合の優先順位
    
    通常検索内容は左から順番に処理されますが、\`()\` を使って優先順位を調整することができます。特に、OR検索と組み合わせると便利です。
    
    例:
    
    - \`in:日報 えさ OR 餌\` => (\`in:日報\` AND \`えさ\`) OR (\`餌\`) として処理
    - \`in:日報 (えさ OR 餌)\` => (\`in:日報\`) AND ( \`えさ\` OR \`餌\`) として処理
    
    ### 数値や日付で絞り込む
    
    \`stars\`、 \`watches\`、\`comments\`、\`number\`、\`done\`、\`undone\` 、\`created\`、\`updated\` は 以下のような書き方ができます。
    
    | 記法        | 説明              |
    | ----------- | ----------------- |
    | \`stars:3\`   | starが3つ         |
    | \`stars:>3\`  | starが3より大きい |
    | \`stars:<3\`  | starが3未満       |
    | \`stars:>=3\` | starが3以上       |
    | \`stars:<=3\` | starが3以下       |
    
    ### ソート順を指定する
    
    \`sort:ソートキー\`で指定
    
    使えるソートキー
    
    | ソートキー      | 説明                 |
    | --------------- | -------------------- |
    | best_match-desc | ベストマッチ         |
    | updated-desc    | 更新日時が新しい順   |
    | updated-asc     | 更新日時が古い順     |
    | created-desc    | 作成日時が新しい順   |
    | created-asc     | 作成日時が古い順     |
    | stars-desc      | Starの多い順         |
    | watches-desc    | Watchの多い順        |
    | comments-desc   | コメントの多い順     |
    | full_name-asc   | カテゴリ・タイトル順 |
    | name-asc        | 記事タイトル順       |
    | number-desc     | 記事IDの大きい順     |
    | number-asc      | 記事IDの小さい順     |
    
    並び替え条件を best_match-desc にして検索すると、特定の条件に合致するものが優先的に検索上位に来るようになります。詳しくは、[キーワード検索しやすい記事にするコツ](#xxx)をご確認ください。
    
    ## 検索例
    
    - \`help\`
      - 記事名もしくはカテゴリもしくは記事本文に \`help\` が含まれる記事を検索
      - https://docs.esa.io/posts?q=help
    - \`-in:help user:fukayatsu\`
      - カテゴリに \`help\` が含まれず、\`fukayatsu\` が作成した記事を検索
      - https://docs.esa.io/posts?q=-in%3Ahelp+user%3Afukayatsu
    - \`name:テーブル #markdown\`
      - 記事名に \`テーブル\` が含まれ、 \`markdown\` タグが付いている記事を検索
      - https://docs.esa.io/posts?q=name%3A%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB+%23markdown&tag=markdown
    `
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's behavior as a retrieval operation ('retrieves comprehensive documentation') and specifies the content scope ('query syntax, operators, and search parameters'), but lacks details on permissions, rate limits, or response format. It adequately describes core behavior without contradictions.

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 two sentences that are front-loaded with the main purpose and efficiently detail the scope without redundancy. Every sentence adds value by specifying what is retrieved and why, with zero waste.

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 low complexity (0 parameters, no annotations, no output schema), the description is complete enough for its purpose. It clearly states what the tool does and its utility, though it could benefit from mentioning the output format or any behavioral constraints to enhance completeness.

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 the baseline is 4. The description adds no parameter information, which is appropriate since none are needed, and does not detract from the schema's completeness.

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

Purpose5/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 with specific verbs ('retrieves', 'provides') and resources ('documentation about esa.io search queries'), distinguishing it from siblings like search_esa_posts (which executes searches) by focusing on documentation retrieval rather than data operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('to effectively search through esa posts') and distinguishes from siblings by focusing on documentation, but does not explicitly state when to use this tool versus alternatives like search_esa_posts or provide exclusions. The guidance is clear but not comprehensive.

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/d-kimuson/esa-mcp-server'

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