Skip to main content
Glama

search-by-medium

Search the Art Institute of Chicago collection by medium to find artworks matching specific materials like oil on canvas or watercolor on paper.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mediumYesThe medium to search for (e.g., "oil on canvas", "acrylic on panel", "watercolor on paper").
limitNoThe number of resources to return per page.
pageNoThe page of results to return. Used for pagination.

Implementation Reference

  • Core execution logic: builds Elasticsearch query for medium search, performs POST to /artworks/search API, attaches pagination, and formats results using BaseTool's formatArtworkList.
    public async executeCore(input: z.infer<typeof this.inputSchema>) {
      const { medium, limit, page } = input;
    
      const query = {
        query: {
          bool: {
            should: [
              { match_phrase: { medium_display: `${medium}` } },
              { match: { medium_display: medium } },
            ],
            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: any) => {
        artwork._pagination = parsedData.pagination;
      });
    
      return this.formatArtworkList(parsedData.data, medium);
    }
  • Zod input schema defining required 'medium' string and optional 'limit'/'page' numbers with descriptions.
    const mediumSearchSchema = z.object({
      medium: z
        .string()
        .describe(
          'The medium to search for (e.g., "oil on canvas", "acrylic on panel", "watercolor on paper").',
        ),
      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:87-92 (registration)
    Registers the tool with MCP server via server.tool(), binding name, description, input schema shape, and execute method.
    this.server.tool(
      this.searchByMediumTool.name,
      this.searchByMediumTool.description,
      this.searchByMediumTool.inputSchema.shape,
      this.searchByMediumTool.execute.bind(this.searchByMediumTool),
    );
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 of behavioral disclosure. It mentions pagination support, which is useful context beyond basic functionality, but doesn't cover other important aspects like rate limits, authentication needs, error handling, or what the response format looks like. The description doesn't contradict any annotations (since there are none), but it's incomplete for a search tool.

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 directly state the tool's purpose and a key feature (pagination). There's no wasted text, and it's front-loaded with the main functionality. It could be slightly improved by integrating the pagination note more seamlessly, but it's efficient overall.

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 minimally adequate. It covers the basic purpose and pagination but lacks details on response format, error cases, or how results are structured. Without annotations or output schema, more behavioral context would be helpful for the agent to use it effectively.

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 fully documents all three parameters (medium, limit, page). The description adds no additional meaning about parameters beyond what's in the schema—it mentions the 'page' parameter for pagination, but the schema already describes this. Baseline 3 is appropriate when the schema does all the work.

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 verb ('search') and resource ('artworks by medium in the Art Institute of Chicago'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'search-by-title' or 'full-text-search', which would require mentioning that this tool focuses specifically on medium-based filtering rather than other search criteria.

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 'search-by-title' or 'full-text-search'. It mentions pagination support, which is a technical feature, but doesn't help the agent decide between this and other search tools based on use case or context.

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