mt_code_search

Pack: montana-code · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/mt_code_search for the schema, then POST the same URL with its arguments for the data.

Search the Montana Code Annotated BY TOPIC or keyword rather than citation — “computing time deadline holiday”, “landlord security deposit”, “deliberate homicide”. Covers all 54 MCA titles, including Title 25 chapter 20, the Montana Rules of Civil Procedure (Rule 6 computing time is MCA 25-20-206). Returns ranked sections with citation, heading and an opening excerpt; call mt_code_section with a result’s citation for the full text. Full-text match, not semantic search. A query with no hits returns found:false. Keyless.

Parameters

NameTypeRequiredDescription
querystringyesTopic or keywords, e.g. “computing time period days holiday”.
limitnumbernoMax results, default 10, max 25.

Example call

Arguments

{
  "query": "computing time period days holiday",
  "limit": 5
}

curl

curl -X POST https://gateway.pipeworx.io/montana-code/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"mt_code_search","arguments":{"query":"computing time period days holiday","limit":5}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('mt_code_search', {
  "query": "computing time period days holiday",
  "limit": 5
});

Response shape

FieldTypeDescription
foundbooleanTrue when at least one section matched
querystringThe query searched
matchstringall_words, or any_word when no section held every word
countnumberNumber of results returned
resultsarrayRanked sections
mca_yearstringMCA edition the index was built from
data_as_ofstringWhen the index was loaded
sourcestringPublisher and dataset
hintstring
reasonstringMachine-readable reason when found is false for an infrastructure cause
messagestring
Full JSON Schema
{
  "type": "object",
  "properties": {
    "found": {
      "type": "boolean",
      "description": "True when at least one section matched"
    },
    "query": {
      "type": "string",
      "description": "The query searched"
    },
    "match": {
      "type": "string",
      "description": "all_words, or any_word when no section held every word"
    },
    "count": {
      "type": "number",
      "description": "Number of results returned"
    },
    "results": {
      "type": "array",
      "description": "Ranked sections",
      "items": {
        "type": "object",
        "properties": {
          "citation": {
            "type": "string",
            "description": "MCA citation, e.g. MCA § 25-20-206"
          },
          "title": {
            "type": "string",
            "description": "MCA title number"
          },
          "section": {
            "type": "string",
            "description": "Section number as cited"
          },
          "heading": {
            "type": [
              "string",
              "null"
            ],
            "description": "Section heading"
          },
          "excerpt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opening text of the section (top results only)"
          },
          "score": {
            "type": "number",
            "description": "bm25 rank score, lower is better"
          }
        },
        "additionalProperties": true
      }
    },
    "mca_year": {
      "type": "string",
      "description": "MCA edition the index was built from"
    },
    "data_as_of": {
      "type": "string",
      "description": "When the index was loaded"
    },
    "source": {
      "type": "string",
      "description": "Publisher and dataset"
    },
    "hint": {
      "type": "string"
    },
    "reason": {
      "type": "string",
      "description": "Machine-readable reason when found is false for an infrastructure cause"
    },
    "message": {
      "type": "string"
    }
  },
  "additionalProperties": true
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the montana-code pack
{
  "mcpServers": {
    "montana-code": {
      "url": "https://gateway.pipeworx.io/montana-code/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 27, 2026