Skip to main content
Glama

search-by-title

Find artworks by title in the Art Institute of Chicago collection. Supports pagination to browse multiple results.

Instructions

Search for artworks by title in the Art Institute of Chicago. Pagination is supported with the page parameter

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesThe title of the artwork to search for.
limitNoThe number of resources to return per page.
pageNoThe page of results to return. Used for pagination.

Implementation Reference

  • Implements the core execution logic for the 'search-by-title' tool: constructs Elasticsearch bool query matching title or alt_titles, performs POST to /artworks/search API with pagination, validates response, attaches pagination to items, and formats the artwork list.
    public async executeCore(input: z.infer<typeof this.inputSchema>) {
      const { title, limit, page } = input;
    
      const query = {
        query: {
          bool: {
            should: [
              { match_phrase: { title: `${title}` } },
              { match_phrase: { alt_titles: `${title}` } },
            ],
            minimum_should_match: 1,
          },
        },
      };
    
      const url = new URL(`${this.apiBaseUrl}/artworks/search`);
      url.searchParams.set('page', `${page}`);
      url.searchParams.set('limit', `${limit}`);
    
      const parsedData = await this.safeApiRequest(
        url,
        {
          method: 'POST',
          body: JSON.stringify(query),
        },
        artworkSearchResponseSchema,
      );
        // Attach pagination info to each artwork for formatting
      parsedData.data.forEach((artwork) => {
        (artwork as any)._pagination = parsedData.pagination;
      });
    
      return this.formatArtworkList(parsedData.data, title);
    }
  • Input schema for the 'search-by-title' tool, validating title (required), and optional limit/page for pagination.
    const titleSearchSchema = z.object({
      title: z.string().describe('The title of the artwork to search for.'),
      limit: z.number().optional().default(10).describe('The number of resources to return per page.'),
      page: z.number().optional().default(1).describe('The page of results to return. Used for pagination.'),
    });
  • src/index.ts:58-61 (registration)
    Registers the 'search-by-title' tool instance with the MCP server, providing name, description, input schema shape, and bound execute method.
    this.searchByTitleTool.name,
    this.searchByTitleTool.description,
    this.searchByTitleTool.inputSchema.shape,
    this.searchByTitleTool.execute.bind(this.searchByTitleTool),
  • Output schema used by the 'search-by-title' tool to validate the Art Institute API search response, including pagination, data array with artwork summaries, info, and config.
    export const artworkSearchResponseSchema = z.object({
      preference: z.string().nullable(),
      pagination: paginationSchema,
      data: z.array(z.object({
        _score: z.number(),
        id: z.number(),
        api_model: z.string(),
        api_link: z.string(),
        is_boosted: z.boolean(),
        title: z.string(),
        thumbnail: thumbnailSchema.nullable(),
        timestamp: z.string(),
      })),
      info: apiInfoSchema,
      config: apiConfigSchema,
    });
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 pagination behavior ('Pagination is supported with the page parameter'), which is useful context beyond the schema. However, it doesn't cover other behavioral traits like rate limits, authentication needs, error handling, or what the search returns (e.g., partial matches, case sensitivity). The description doesn't contradict annotations since there are none.

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 appropriately sized and front-loaded: the first sentence states the core purpose, and the second adds key behavioral context (pagination). Both sentences earn their place with no wasted words, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (search with pagination), no annotations, and no output schema, the description is somewhat complete but has gaps. It covers the basic purpose and pagination, but lacks details on search behavior (e.g., fuzzy matching), result format, or error cases. For a search tool with 3 parameters, it's adequate but not fully comprehensive.

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 parameters (title, limit, page) with descriptions and defaults. The description adds minimal value beyond this: it mentions pagination with the page parameter, which is already in the schema. No additional semantics or usage examples are provided, so it meets the baseline of 3.

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: 'Search for artworks by title in the Art Institute of Chicago.' It specifies the verb ('search'), resource ('artworks'), and scope ('by title'), distinguishing it from siblings like search-by-medium or get-artwork-by-artist. However, it doesn't explicitly differentiate from full-text-search, which might also search titles, so it's not a perfect 5.

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 like full-text-search or search-by-medium. It mentions pagination support but doesn't clarify if this is the preferred tool for title searches over other search methods. No exclusions or prerequisites are stated.

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/mikechao/artic-mcp'

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