week_number
Get the ISO week number of a date.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Date (YYYY-MM-DD) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| date | No | ||
| error | No | ||
| day_name | No | ||
| iso_year | No | ||
| day_of_week | No | ||
| week_number | No |
Get the ISO week number of a date.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Date (YYYY-MM-DD) |
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| date | No | ||
| error | No | ||
| day_name | No | ||
| iso_year | No | ||
| day_of_week | No | ||
| week_number | No |
Changes observed during successful MCP inspections.
Output schema / $defs / WeekNumberResponseAdded value: +{
+ "properties": {
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Code"
+ },
+ "date": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Date"
+ },
+ "day_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Name"
+ },
+ "day_of_week": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Of Week"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Error"
+ },
+ "iso_year": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Iso Year"
+ },
+ "week_number": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Week Number"
+ }
+ },
+ "title": "WeekNumberResponse",
+ "type": "object"
+}Output schema / $defs / app__routers__datetime_utils__WeekNumberResponseRemoved value: -{
- "properties": {
- "code": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Code"
- },
- "date": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Date"
- },
- "day_name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Name"
- },
- "day_of_week": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Of Week"
- },
- "error": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Error"
- },
- "iso_year": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Iso Year"
- },
- "week_number": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Week Number"
- }
- },
- "title": "WeekNumberResponse",
- "type": "object"
-}Output schema / x-fastmcp-top-level-schemaPrevious value: -"app__routers__datetime_utils__WeekNumberResponse"New value: +"WeekNumberResponse"Output schema / $defs / WeekNumberResponseRemoved value: -{
- "properties": {
- "code": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Code"
- },
- "date": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Date"
- },
- "day_name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Name"
- },
- "day_of_week": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Of Week"
- },
- "error": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Error"
- },
- "iso_year": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Iso Year"
- },
- "week_number": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Week Number"
- }
- },
- "title": "WeekNumberResponse",
- "type": "object"
-}Output schema / $defs / app__routers__datetime_utils__WeekNumberResponseAdded value: +{
+ "properties": {
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Code"
+ },
+ "date": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Date"
+ },
+ "day_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Name"
+ },
+ "day_of_week": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Of Week"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Error"
+ },
+ "iso_year": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Iso Year"
+ },
+ "week_number": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Week Number"
+ }
+ },
+ "title": "WeekNumberResponse",
+ "type": "object"
+}Output schema / x-fastmcp-top-level-schemaPrevious value: -"WeekNumberResponse"New value: +"app__routers__datetime_utils__WeekNumberResponse"Output schema / $defs / WeekNumberResponseAdded value: +{
+ "properties": {
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Code"
+ },
+ "date": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Date"
+ },
+ "day_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Name"
+ },
+ "day_of_week": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Of Week"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Error"
+ },
+ "iso_year": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Iso Year"
+ },
+ "week_number": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Week Number"
+ }
+ },
+ "title": "WeekNumberResponse",
+ "type": "object"
+}Output schema / $defs / app__routers__datetime_utils__WeekNumberResponseRemoved value: -{
- "properties": {
- "code": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Code"
- },
- "date": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Date"
- },
- "day_name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Name"
- },
- "day_of_week": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Of Week"
- },
- "error": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Error"
- },
- "iso_year": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Iso Year"
- },
- "week_number": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Week Number"
- }
- },
- "title": "WeekNumberResponse",
- "type": "object"
-}Output schema / x-fastmcp-top-level-schemaPrevious value: -"app__routers__datetime_utils__WeekNumberResponse"New value: +"WeekNumberResponse"Output schema / $defs / WeekNumberResponseRemoved value: -{
- "properties": {
- "code": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Code"
- },
- "date": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Date"
- },
- "day_name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Name"
- },
- "day_of_week": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Of Week"
- },
- "error": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Error"
- },
- "iso_year": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Iso Year"
- },
- "week_number": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Week Number"
- }
- },
- "title": "WeekNumberResponse",
- "type": "object"
-}Output schema / $defs / app__routers__datetime_utils__WeekNumberResponseAdded value: +{
+ "properties": {
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Code"
+ },
+ "date": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Date"
+ },
+ "day_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Name"
+ },
+ "day_of_week": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Of Week"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Error"
+ },
+ "iso_year": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Iso Year"
+ },
+ "week_number": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Week Number"
+ }
+ },
+ "title": "WeekNumberResponse",
+ "type": "object"
+}Output schema / x-fastmcp-top-level-schemaPrevious value: -"WeekNumberResponse"New value: +"app__routers__datetime_utils__WeekNumberResponse"Output schema / $defs / WeekNumberResponseAdded value: +{
+ "properties": {
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Code"
+ },
+ "date": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Date"
+ },
+ "day_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Name"
+ },
+ "day_of_week": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Of Week"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Error"
+ },
+ "iso_year": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Iso Year"
+ },
+ "week_number": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Week Number"
+ }
+ },
+ "title": "WeekNumberResponse",
+ "type": "object"
+}Output schema / $defs / app__routers__datetime_utils__WeekNumberResponseRemoved value: -{
- "properties": {
- "code": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Code"
- },
- "date": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Date"
- },
- "day_name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Name"
- },
- "day_of_week": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Of Week"
- },
- "error": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Error"
- },
- "iso_year": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Iso Year"
- },
- "week_number": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Week Number"
- }
- },
- "title": "WeekNumberResponse",
- "type": "object"
-}Output schema / x-fastmcp-top-level-schemaPrevious value: -"app__routers__datetime_utils__WeekNumberResponse"New value: +"WeekNumberResponse"Output schema / $defs / WeekNumberResponseRemoved value: -{
- "properties": {
- "code": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Code"
- },
- "date": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Date"
- },
- "day_name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Name"
- },
- "day_of_week": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Of Week"
- },
- "error": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Error"
- },
- "iso_year": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Iso Year"
- },
- "week_number": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Week Number"
- }
- },
- "title": "WeekNumberResponse",
- "type": "object"
-}Output schema / $defs / app__routers__datetime_utils__WeekNumberResponseAdded value: +{
+ "properties": {
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Code"
+ },
+ "date": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Date"
+ },
+ "day_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Name"
+ },
+ "day_of_week": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Of Week"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Error"
+ },
+ "iso_year": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Iso Year"
+ },
+ "week_number": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Week Number"
+ }
+ },
+ "title": "WeekNumberResponse",
+ "type": "object"
+}Output schema / x-fastmcp-top-level-schemaPrevious value: -"WeekNumberResponse"New value: +"app__routers__datetime_utils__WeekNumberResponse"Output schema / $defs / WeekNumberResponseAdded value: +{
+ "properties": {
+ "code": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Code"
+ },
+ "date": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Date"
+ },
+ "day_name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Name"
+ },
+ "day_of_week": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Day Of Week"
+ },
+ "error": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Error"
+ },
+ "iso_year": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Iso Year"
+ },
+ "week_number": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Week Number"
+ }
+ },
+ "title": "WeekNumberResponse",
+ "type": "object"
+}Output schema / $defs / app__routers__datetime_utils__WeekNumberResponseRemoved value: -{
- "properties": {
- "code": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Code"
- },
- "date": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Date"
- },
- "day_name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Name"
- },
- "day_of_week": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Day Of Week"
- },
- "error": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "title": "Error"
- },
- "iso_year": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Iso Year"
- },
- "week_number": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "title": "Week Number"
- }
- },
- "title": "WeekNumberResponse",
- "type": "object"
-}Output schema / x-fastmcp-top-level-schemaPrevious value: -"app__routers__datetime_utils__WeekNumberResponse"New value: +"WeekNumberResponse"Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the burden. It does disclose the ISO 8601 convention, which is genuinely useful since it fixes week-start and week-1 semantics, but it says nothing about year-boundary edge cases (e.g., Dec 31 belonging to week 1 of the next year) or how the week number is formatted.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single dense sentence with the key qualifier (ISO) front-loaded and no filler. Nothing could be removed without losing meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists and the parameter is fully described, so return-value explanation is unnecessary; the ISO qualifier covers the main semantic risk. The only real gap is disambiguating from week_number_2, which the description leaves unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the single 'date' parameter is already documented as YYYY-MM-DD in the schema. The description adds no additional meaning about the parameter beyond the schema baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb-plus-resource ('Get the ISO week number of a date') with the ISO qualifier adding precision beyond the bare name. It does not differentiate itself from the near-identically named sibling week_number_2, so an agent cannot tell the two apart from the description alone.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No indication of when this should be used versus week_number_2, day_of_year, get_quarter, or parse_date. The usage is only implied by the tool name itself; nothing tells an agent which of the competing date-numbering tools to pick.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.