Skip to main content
Glama
tiovikram

Linear MCP Server

by tiovikram

search_issues

Search Linear issues using text queries to find and retrieve relevant tickets for project management and tracking.

Instructions

Search for issues using a text query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query text
firstNoNumber of results to return (default: 50)

Implementation Reference

  • The switch case handler for the 'search_issues' tool. Validates input arguments, calls LinearClient.searchIssues with the query, formats the search results (including id, title, status, assignee, priority, url, metadata), and returns as JSON text content.
    case "search_issues": {
      const args = request.params.arguments as unknown as SearchIssuesArgs;
      if (!args?.query) {
        throw new Error("Search query is required");
      }
    
      const searchResults = await linearClient.searchIssues(args.query, {
        first: args?.first ?? 50,
      });
    
      const formattedResults = await Promise.all(
        searchResults.nodes.map(async (result) => {
          const state = await result.state;
          const assignee = await result.assignee;
          return {
            id: result.id,
            title: result.title,
            status: state ? await state.name : "Unknown",
            assignee: assignee ? assignee.name : "Unassigned",
            priority: result.priority,
            url: result.url,
            metadata: result.metadata,
          };
        })
      );
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(formattedResults, null, 2),
          },
        ],
      };
    }
  • The input schema definition for the 'search_issues' tool as provided in the tool registration, specifying the expected arguments (query required, first optional).
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "Search query text",
        },
        first: {
          type: "number",
          description: "Number of results to return (default: 50)",
        },
      },
      required: ["query"],
    },
  • src/index.ts:186-203 (registration)
    The full tool object registration for 'search_issues' in the ListTools response, including name, description, and input schema.
    {
      name: "search_issues",
      description: "Search for issues using a text query",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query text",
          },
          first: {
            type: "number",
            description: "Number of results to return (default: 50)",
          },
        },
        required: ["query"],
      },
    },
  • TypeScript type definition matching the input schema for SearchIssuesArgs used in the handler for type safety.
    type SearchIssuesArgs = {
      query: string;
      first?: number;
    };
  • src/index.ts:52-52 (registration)
    Capability flag in server capabilities declaring support for the 'search_issues' tool.
    search_issues: true,

Tool Definition Quality

Score is being calculated. Check back soon.

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/tiovikram/linear-mcp'

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