Skip to main content
Glama
Hint-Services

Obsidian GitHub MCP

searchIssues

Search GitHub issues and discussions in your Obsidian vault repository to track tasks, manage projects, and enhance collaborative knowledge work using structured queries.

Instructions

Search for issues and discussions in your Obsidian vault repository (my-organization/obsidian-vault). Great for tracking tasks, project management, and collaborative knowledge work.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (uses GitHub Issue Search syntax)

Implementation Reference

  • Handler function that searches for issues in the GitHub repository using the Octokit client. It appends 'is:issue' to the query and formats the results as a markdown list.
    async ({ query }) => {
      const repoQualifier = `repo:${this.config.owner}/${this.config.repo}`;
      const qualifiedQuery = `${query} is:issue ${repoQualifier}`;
      const searchResults = await this.handleRequest(async () => {
        return this.octokit.search.issuesAndPullRequests({
          q: qualifiedQuery,
        });
      });
      // Format results as a markdown list
      const formattedResults = searchResults.items
        .map((item) => `- #${item.number} ${item.title} (${item.html_url})`)
        .join("\n");
      return {
        // Return formatted text instead of raw JSON string
        content: [
          {
            type: "text" as const,
            text: `Found ${searchResults.total_count} issues:\n${formattedResults}`,
          },
        ],
      };
    }
  • Zod schema defining the input parameter 'query' for the searchIssues tool.
      query: z
        .string()
        .describe("Search query (uses GitHub Issue Search syntax)"),
    },
  • Registration of the searchIssues tool using server.tool, including name, description, schema, hints, and inline handler.
    server.tool(
      "searchIssues",
      `Search for issues and discussions in your Obsidian vault repository (${this.config.owner}/${this.config.repo}). Great for tracking tasks, project management, and collaborative knowledge work.`,
      {
        query: z
          .string()
          .describe("Search query (uses GitHub Issue Search syntax)"),
      },
      {
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true,
      },
      async ({ query }) => {
        const repoQualifier = `repo:${this.config.owner}/${this.config.repo}`;
        const qualifiedQuery = `${query} is:issue ${repoQualifier}`;
        const searchResults = await this.handleRequest(async () => {
          return this.octokit.search.issuesAndPullRequests({
            q: qualifiedQuery,
          });
        });
        // Format results as a markdown list
        const formattedResults = searchResults.items
          .map((item) => `- #${item.number} ${item.title} (${item.html_url})`)
          .join("\n");
        return {
          // Return formatted text instead of raw JSON string
          content: [
            {
              type: "text" as const,
              text: `Found ${searchResults.total_count} issues:\n${formattedResults}`,
            },
          ],
        };
      }
    );
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. While it mentions the repository scope ('my-organization/obsidian-vault'), it doesn't describe authentication requirements, rate limits, pagination behavior, or what format the results will be returned in. For a search tool with zero annotation coverage, 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 appropriately concise with two sentences that each serve a purpose: the first states the core functionality, and the second provides usage context. It's front-loaded with the main purpose and avoids unnecessary elaboration.

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 that there are no annotations and no output schema, the description should provide more complete context about behavioral aspects like authentication, rate limits, and result format. While it specifies the repository scope, it doesn't address these other important considerations for a search operation, leaving the agent with insufficient information.

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, with the single parameter 'query' clearly documented as using 'GitHub Issue Search syntax.' The description doesn't add any additional parameter information beyond what the schema provides, so the baseline score of 3 is appropriate when the schema does the heavy lifting.

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 searches for 'issues and discussions' in a specific repository, which is a specific verb+resource combination. It distinguishes from sibling tools like getCommitHistory and getFileContents by focusing on issues rather than commits or file contents. However, it doesn't explicitly differentiate from searchFiles which might also search repository content.

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

Usage Guidelines3/5

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

The description provides some context about when to use this tool ('Great for tracking tasks, project management, and collaborative knowledge work'), which implies usage scenarios. However, it doesn't explicitly state when to use this versus the sibling searchFiles tool, nor does it provide any exclusions or alternative recommendations.

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

Related 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/Hint-Services/obsidian-github-mcp'

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