Plumbkit
Exact utilities for agents: time zones, date math, business days, calculator, units, validation.
我該用這個嗎
品質與安全性
發現項目(1)
- LOW在 validate_url 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"plumbkit": {
"url": "https://plumbkit.dev/mcp"
}
}
}遠端端點
https://plumbkit.dev/mcpstreamable-http它能做什麼
工具清單
工具(16)
🟢current_time(timezone)
Returns the exact current date, time, weekday and UTC offset in any time zone. Use this whenever you need to know today's date or the current time instead of guessing — your training data does not know what day it is.
輸入結構描述
{
"type": "object",
"properties": {
"timezone": {
"type": "string",
"description": "IANA time zone name, e.g. \"America/New_York\", \"Europe/London\", \"Asia/Tokyo\", or \"UTC\". Fixed offsets like \"UTC+5:30\" also work.",
"default": "UTC",
"maxLength": 64
}
},
"additionalProperties": false
}🟢convert_timezone(datetime, from_timezone, to_timezone)
Converts a date/time from one time zone to another, correctly handling daylight saving time. If the input already includes an offset or 'Z', from_timezone is ignored.
輸入結構描述
{
"type": "object",
"properties": {
"datetime": {
"type": "string",
"description": "Date/time in ISO 8601 (e.g. \"2026-03-08T14:30\", \"2026-03-08T14:30:00Z\", \"2026-03-08\"), \"YYYY-MM-DD HH:mm\", a Unix timestamp in seconds or milliseconds, or \"now\".",
"maxLength": 64
},
"from_timezone": {
"type": "string",
"description": "IANA time zone name, e.g. \"America/New_York\", \"Europe/London\", \"Asia/Tokyo\", or \"UTC\". Fixed offsets like \"UTC+5:30\" also work. Defaults to UTC.",
"maxLength": 64
},
"to_timezone": {
"type": "string",
"description": "IANA time zone name, e.g. \"America/New_York\", \"Europe/London\", \"Asia/Tokyo\", or \"UTC\". Fixed offsets like \"UTC+5:30\" also work.",
"maxLength": 64
}
},
"required": [
"datetime",
"to_timezone"
],
"additionalProperties": false
}🟢date_add(datetime, timezone, years, months, weeks, ...)
Adds or subtracts a duration (years, months, weeks, days, hours, minutes, seconds) to a date/time. Use negative numbers to subtract. Calendar-aware: adding 1 month to Jan 31 gives Feb 28/29, and adding days keeps the same local clock time across daylight-saving changes.
輸入結構描述
{
"type": "object",
"properties": {
"datetime": {
"type": "string",
"description": "Date/time in ISO 8601 (e.g. \"2026-03-08T14:30\", \"2026-03-08T14:30:00Z\", \"2026-03-08\"), \"YYYY-MM-DD HH:mm\", a Unix timestamp in seconds or milliseconds, or \"now\".",
"maxLength": 64
},
"timezone": {
"type": "string",
"description": "Time zone the arithmetic happens in. IANA time zone name, e.g. \"America/New_York\", \"Europe/London\", \"Asia/Tokyo\", or \"UTC\". Fixed offsets like \"UTC+5:30\" also work. Defaults to UTC.",
"maxLength": 64
},
"years": {
"type": "number",
"description": "years to add (negative to subtract)",
"minimum": -10000000,
"maximum": 10000000
},
"months": {
"type": "number",
"description": "months to add (negative to subtract)",
"minimum": -10000000,
"maximum": 10000000
},
"weeks": {
"type": "number",
"description": "weeks to add (negative to subtract)",
"minimum": -10000000,
"maximum": 10000000
},
"days": {
"type": "number",
"description": "days to add (negative to subtract)",
"minimum": -10000000,
"maximum": 10000000
},
"hours": {
"type": "number",
"description": "hours to add (negative to subtract)",
"minimum": -10000000,
"maximum": 10000000
},
"minutes": {
"type": "number",
"description": "minutes to add (negative to subtract)",
"minimum": -10000000,
"maximum": 10000000
},
"seconds": {
"type": "number",
"description": "seconds to add (negative to subtract)",
"minimum": -10000000,
"maximum": 10000000
}
},
"required": [
"datetime"
],
"additionalProperties": false
}🟢date_diff(start, end, timezone)
Calculates the exact time between two dates/times: a calendar breakdown (years, months, days, hours, minutes, seconds) plus totals in days, hours, minutes and seconds, and the number of calendar days. Negative if end is before start.
輸入結構描述
{
"type": "object",
"properties": {
"start": {
"type": "string",
"description": "Date/time in ISO 8601 (e.g. \"2026-03-08T14:30\", \"2026-03-08T14:30:00Z\", \"2026-03-08\"), \"YYYY-MM-DD HH:mm\", a Unix timestamp in seconds or milliseconds, or \"now\".",
"maxLength": 64
},
"end": {
"type": "string",
"description": "Date/time in ISO 8601 (e.g. \"2026-03-08T14:30\", \"2026-03-08T14:30:00Z\", \"2026-03-08\"), \"YYYY-MM-DD HH:mm\", a Unix timestamp in seconds or milliseconds, or \"now\".",
"maxLength": 64
},
"timezone": {
"type": "string",
"description": "Time zone for inputs without an offset. IANA time zone name, e.g. \"America/New_York\", \"Europe/London\", \"Asia/Tokyo\", or \"UTC\". Fixed offsets like \"UTC+5:30\" also work. Defaults to UTC.",
"maxLength": 64
}
},
"required": [
"start",
"end"
],
"additionalProperties": false
}🟢business_days(mode, start_date, days, end_date, holidays, ...)
Works with business (working) days. mode "add": returns the date N business days after start_date (start_date itself is not counted; negative N goes backward; 0 returns start_date, or the next business day if start_date is not one). mode "count": counts business days from start_date to end_date, including both ends. Weekends default to Saturday and Sunday. Public holidays are NOT built in — pass them in "holidays".
輸入結構描述
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"add",
"count"
],
"description": "\"add\" or \"count\""
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "YYYY-MM-DD"
},
"days": {
"type": "integer",
"minimum": -10000,
"maximum": 10000,
"description": "Business days to add (mode \"add\")"
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "YYYY-MM-DD (mode \"count\")"
},
"holidays": {
"type": "array",
"maxItems": 1000,
"items": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"description": "Dates (YYYY-MM-DD) to treat as non-working days"
},
"weekend": {
"type": "array",
"maxItems": 6,
"items": {
"type": "integer",
"minimum": 1,
"maximum": 7
},
"description": "Weekend days as ISO weekday numbers (1=Monday ... 7=Sunday). Default [6, 7]. Example for Friday-Saturday weekends: [5, 6]"
}
},
"required": [
"mode",
"start_date"
],
"additionalProperties": false
}🟢calculate(expression, decimals)
Evaluates an arithmetic expression exactly, so you don't have to do mental math. Supports + - * / % ^ (or **), parentheses, constants pi/e/tau and functions: sqrt, cbrt, abs, round(x, digits), floor, ceil, trunc, sign, ln, log(x[, base]), log10, log2, exp, pow, sin, cos, tan, asin, acos, atan, atan2, min, max, hypot, factorial. Trig uses radians. Example: "(1250 * 1.08^5) - 1250".
輸入結構描述
{
"type": "object",
"properties": {
"expression": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"description": "The expression to evaluate"
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 15,
"description": "Optional: round the result to this many decimal places"
}
},
"required": [
"expression"
],
"additionalProperties": false
}🟢convert_units(value, from, to)
Converts a value between units of length, mass, volume (US and imperial), area, speed, time, digital data (KB vs KiB, bits vs bytes), energy, pressure and temperature. Accepts common abbreviations (km, lb, fl oz, mph, °F, GiB). US customary units are used for cup/pint/quart/gallon unless you say imperial.
輸入結構描述
{
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "The number to convert"
},
"from": {
"type": "string",
"maxLength": 40,
"description": "Unit to convert from, e.g. \"mi\", \"pound\", \"°F\", \"GB\""
},
"to": {
"type": "string",
"maxLength": 40,
"description": "Unit to convert to, e.g. \"km\", \"kg\", \"celsius\", \"GiB\""
}
},
"required": [
"value",
"from",
"to"
],
"additionalProperties": false
}🟢text_stats(text, count, case_sensitive, overlapping)
Counts exactly what language models are bad at counting: characters (as humans see them), words, lines, sentences, paragraphs, UTF-8 bytes, and occurrences of a letter or substring (e.g. how many "r" in "strawberry"). Use it to check length limits (tweets, SMS, meta descriptions, form fields) before submitting text.
輸入結構描述
{
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 200000,
"description": "The text to analyze"
},
"count": {
"type": "string",
"maxLength": 1000,
"description": "Optional letter, word or substring to count occurrences of"
},
"case_sensitive": {
"type": "boolean",
"description": "For `count`. Default false."
},
"overlapping": {
"type": "boolean",
"description": "For `count`: count overlapping matches (\"aa\" in \"aaa\" = 2). Default false."
}
},
"required": [
"text"
],
"additionalProperties": false
}🟢hash_text(text, operation)
Computes a cryptographic hash (SHA-1, SHA-256, SHA-384, SHA-512) of text, or encodes/decodes it as Base64, Base64URL, hex or URL-encoding. Text is treated as UTF-8.
輸入結構描述
{
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 200000
},
"operation": {
"type": "string",
"enum": [
"sha1",
"sha256",
"sha384",
"sha512",
"base64_encode",
"base64_decode",
"base64url_encode",
"base64url_decode",
"hex_encode",
"hex_decode",
"url_encode",
"url_decode"
]
}
},
"required": [
"text",
"operation"
],
"additionalProperties": false
}🟢regex_test(pattern, flags, text, replace_with, max_matches)
Runs a JavaScript regular expression against text and returns every match with its position and capture groups, or the text after replacement. Use it to verify a regex actually works before relying on it.
輸入結構描述
{
"type": "object",
"properties": {
"pattern": {
"type": "string",
"minLength": 1,
"maxLength": 1000,
"description": "Regex pattern without slashes, e.g. \"(\\\\d{3})-(\\\\d{4})\""
},
"flags": {
"type": "string",
"maxLength": 6,
"pattern": "^[imsuy]*$",
"description": "Optional flags: i (ignore case), m (multiline), s (dotall), u (unicode), y (sticky). Global matching is always on."
},
"text": {
"type": "string",
"maxLength": 50000
},
"replace_with": {
"type": "string",
"maxLength": 1000,
"description": "Optional replacement string ($1, $<name> supported). If set, returns the replaced text too."
},
"max_matches": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"description": "Default 100"
}
},
"required": [
"pattern",
"text"
],
"additionalProperties": false
}🟢validate_email(email, check_dns)
Checks whether an email address is correctly formatted and returns a normalized version. Set check_dns=true to also confirm the domain exists and can receive mail (MX records). Does not send email and cannot confirm that a specific mailbox exists.
輸入結構描述
{
"type": "object",
"properties": {
"email": {
"type": "string",
"maxLength": 512
},
"check_dns": {
"type": "boolean",
"description": "Also look up the domain's mail servers. Default false."
}
},
"required": [
"email"
],
"additionalProperties": false
}🟢validate_phone(phone, default_country)
Validates a phone number using Google's libphonenumber rules and returns it in E.164 (+14155552671), international and national formats, plus the country and line type (mobile, fixed line, toll free...). For numbers without a +country code, pass default_country.
輸入結構描述
{
"type": "object",
"properties": {
"phone": {
"type": "string",
"maxLength": 64
},
"default_country": {
"type": "string",
"pattern": "^[A-Za-z]{2}$",
"description": "Two-letter country code used when the number has no \"+\" prefix, e.g. \"US\", \"GB\", \"DE\""
}
},
"required": [
"phone"
],
"additionalProperties": false
}🟢validate_url(url, require_https)
Checks that a URL is well-formed, normalizes it (lowercase host, punycode, default ports removed, spaces encoded) and splits it into parts including each query parameter. Flags common problems such as missing scheme, private/localhost addresses and credentials embedded in the URL. Does not fetch the URL.
輸入結構描述
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 8192
},
"require_https": {
"type": "boolean",
"description": "Treat http:// as invalid. Default false."
}
},
"required": [
"url"
],
"additionalProperties": false
}🟢validate_iban(iban)
Validates an International Bank Account Number: country, length for that country, and the mod-97 check digits. Returns electronic and printed formats. A valid IBAN is correctly formed; this does not confirm the account exists.
輸入結構描述
{
"type": "object",
"properties": {
"iban": {
"type": "string",
"maxLength": 64
}
},
"required": [
"iban"
],
"additionalProperties": false
}🟢json_repair(text, pretty)
Turns almost-JSON into valid JSON: removes markdown code fences, comments and trailing commas, adds missing quotes, commas and closing brackets, converts single quotes, Python True/False/None and truncated output. Returns the repaired JSON string and whether the input was already valid.
輸入結構描述
{
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 500000,
"description": "The broken JSON text"
},
"pretty": {
"type": "boolean",
"description": "Indent the output. Default false."
}
},
"required": [
"text"
],
"additionalProperties": false
}🟢json_schema_validate(data, schema, draft)
Checks a JSON value against a JSON Schema (drafts 4, 7, 2019-09 and 2020-12) and lists every violation with its location. Use it to confirm structured output or an API payload is correct before sending it. `data` and `schema` may be JSON values or JSON strings.
輸入結構描述
{
"type": "object",
"properties": {
"data": {
"description": "The JSON value to check (any type), or a JSON string of it"
},
"schema": {
"description": "The JSON Schema (object), or a JSON string of it"
},
"draft": {
"type": "string",
"enum": [
"4",
"7",
"2019-09",
"2020-12"
],
"description": "Default 2020-12"
}
},
"required": [
"data",
"schema"
],
"additionalProperties": false
}社群
證據